AB.net Donation Drive!';
echo '
';
if (!isset($data[2]))
echo '
| $'.$data[0].' |
$'.$data[1].' |
';
else
echo '
| $'.$data[0].' |
$'.$data[1].' |
$'.$data[2].' |
';
$sayings[] = 'Just a bit more guys!';
$sayings[] = 'It can\'t hurt to help!';
$sayings[] = 'Be a pal, a PayPal!';
$sayings[] = 'We need money. Badly. :(';
$sayings[] = 'People pay more in rent!';
$sayings[] = 'Keep us in business.';
$sayings[] = 'Feel good; lend a hand.';
echo ''.$sayings[rand(0, count($sayings) - 1)].'
';
echo 'Donate Now.
';
echo '
';
}
function dd_update_data()
{
$stream = fsockopen('animeblogger.net', 80, $errno, $errstr, 10);
if (!$stream)
{
//unhandled error
}
else
{
$data = array();
$dpos = 0;
fwrite($stream, "GET /donations/DonationDriver.status HTTP/1.0\r\n");
fwrite($stream, "User-Agent: DonationDriver WordPress Plugin (compatible; Mozilla 4.0; MSIE 5.5; http://animeblogger.net/)\r\n");
fwrite($stream, "Accept: text/plain\r\n");
fwrite($stream, "Host: animeblogger.net\r\n\r\n");
while (!feof($stream))
{
$data[$dpos] = rtrim(fgets($stream, 1024));
$dpos++;
}
fclose($stream);
}
$ndata;
//remove HTTP headers
$offset = 10;
for ($c = $offset; $c < $dpos; $c++)
{
if (is_numeric($data[$c]))
$ndata[] = $data[$c];
}
if (count($ndata) >= 2)
update_option('dd_data', $ndata);
update_option('dd_lastfetch', time());
}
?>