what am i doing wrong?
Code: Select all
<?
function <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span>() {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://nw4.novaworld.net/NWStats.dll');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies');
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
function getbannedcookie($file) {
$dbhost = "localhost";
$dbuname = "";
$dbpass = "";
$dbname = "";
$db = mysql_connect($dbhost, $dbuname, $dbpass);
mysql_select_db($dbname, $db);
$q = "SELECT * FROM chid";
$result3 = mysql_query($q) or die ('Something is wrong with query: ' . $q . '<br>'. mysql_error());
while ($row = mysql_fetch_assoc($result3))
{
$chid = $row['chid'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://nw4.novaworld.net/NWStats.dll?success=bhd_6_stat.htm&failure=bhd_6_main.htm&relay=bhd_6_relay.htm&msgbase=bhd_6_msg.htm&nodb=bhd_6_nodb.htm&statpage=bhd_6_stat.htm&pfid=26&statslot=0&action=stats&showchid=' . $chid . '');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$result = curl_exec($ch);
curl_close($ch);
preg_match('/cid=(.*?), chid=(.*?), charactername="(.*?)" pcid="(.*?)"/', $file, $matches);
$chid1 = $matches[2];
$cid = $matches[1];
$name = $matches[3];
$pcid = $matches[4];
$result2 = mysql_query("INSERT INTO pcid SET chid='$chid1', cid='$cid', name='$name', pcid='$pcid'", $db) or die("Error: ".mysql_error());
}
}
getbannedcookie(<span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span>());
<span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span>();
?>