View feedrarbg.php
<?php
error_reporting (E_ALL);
ini_set ("display_errors", true);
$BASE = strtok (basename ($_SERVER["SCRIPT_NAME"], ".php"), "-");
libxml_use_internal_errors (false);
function clear_dates ($str) {
return preg_replace ("/(\<updated\>)[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}\:[0-9]{2}\:[0-9]{2}\+[0-9]{2}\:[0-9]{2}(\<\/updated\>)/m", "\\1\\2", $str);
View feedimdb.php
<?php
error_reporting (E_ALL);
ini_set ("display_errors", true);
$BASE = strtok (basename ($_SERVER["SCRIPT_NAME"], ".php"), "-");
function clear_dates ($str) {
return preg_replace ("/(\<updated\>)[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}\:[0-9]{2}\:[0-9]{2}\+[0-9]{2}\:[0-9]{2}(\<\/updated\>)/m", "\\1\\2", $str);
}
View indamail-login.php
<?php
$USER="user@vipmail.hu";
$PASSWORD="secret";
function req (&$curl, &$cookies, $url, $post = null) {
curl_setopt_array ($curl, array (
CURLOPT_URL => $url,
CURLOPT_COOKIE => implode (";", (empty ($cookies) ? array () : array_keys ($cookies))),
CURLOPT_POST => false
View crontab.php
<?php
#run on a remote machine's crontab:
#13 * * * * curl --silent http://example.com/crontab.php
#and run on the server's crontab:
#*/5 * * * * cd ~/public_html && php crontab.php
if (PHP_SAPI == "cli") {
file_put_contents ("crontab" . (!empty ($_SERVER["argv"][1]) && preg_match ("/^[a-z_][a-z0-9_]{0,30}$/i", $_SERVER["argv"][1]) ? "-{$_SERVER["argv"][1]}" : "") . ".date", time (), LOCK_EX);
} else {
header ("content-type: text/plain", true);
View logchk.php
<?php
ini_set ("display_errors", true);
if (!empty ($_SERVER["argv"][1])) $name = $_SERVER["argv"][1];
if (empty ($name)) $name = substr ($_SERVER["PWD"], strrpos($_SERVER["PWD"], "/")+1);
define ("datepath", "/var/log/user/logchk-$name.date");
$last = 0;
if (file_exists (datepath)) {
View freemail-login.sh
#!/bin/bash
data='username=user%40freemail.hu&password=secret&ssl=1'
out=$(curl -i --silent --connect-timeout 16 --max-time 32 --data "$data" 'https://accounts.freemail.hu/oauth/login')
if ! echo "$out" | grep -q -F 'Location: http://freemail.hu/mail/index.fm?checkuser=1&status=ok&auth=ok&tid=' 2>/dev/null && ! echo "$out" | grep -q -E '^HTTP\/1\.. 504 Gateway Time\-out(\b|$)' 2>/dev/null ; then
echo "$out"
fi
View ddns-curl.sh
#!/bin/bash
#run from crontab:
#*/5 * * * * ~/bin/ddns-curl.sh
host="example.myvnc.com"
if [ $EUID -ne 0 ] ; then echo 'you are not root' >&2 ; exit 1 ; fi
oldip=$(cat /var/cache/user/ip.txt 2>/dev/null)
View imdb-export.php
<?php
define ("id", 'secretkey');
$USER="123456789";
$curl = curl_init ("http://www.imdb.com/list/export?list_id=ratings&author_id=ur$USER");
curl_setopt_array ($curl, array (
CURLOPT_ENCODING => "",
CURLOPT_COOKIE => "id=".constant("id"),
CURLOPT_RETURNTRANSFER => true,
View sorozatbarat-export.php
<?php
$DOMAIN="www.sorozat-barat.club";
$USER="user";
$PASSWORD="secret";
$curl = curl_init ("https://$DOMAIN/login");
curl_setopt_array ($curl, array (
CURLOPT_ENCODING => "",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => true,
View qr.sh
#!/bin/bash
echo 'INFO usage syntax: qr.sh "*foobar*"' >&2
path=.
if [ -n "$1" ] ; then path="$1" ; fi
find $path -name '*.url' | while read -r file ; do
urls.sh "$file" 2>/dev/null | grep 'imdb.com/title/tt' | qrencode --size=3 --level=L --margin=8 --output=- | convert - +level 0%,50% "$(dirname "$file")/$(basename "$file" .url).png"
done