AB.net Donation Drive!'; 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()); } ?>