For -Php Guru's- Only
someone on anotner board wrote this php script to check if someone cheat galleries by language of browser
so how to modify that to check multiple (100) galleries same time ?
PHP:--------------------------------------------------------------------------------
<?php
if ($_GET["url"]) {
$lang = array("da","nl","es","de","en","fr","ko","zh");
echo "<font size=4><b>Testing $_GET[url] ..........</b></font><br><br>\n\n";
foreach ($lang as $l) {
echo "<b>Testing url with Accept-Language \"$l\":</b><br>\n";
echo hit_it($_GET["url"],$l);
}
}
function hit_it($url, $lang) {
$parsed = parse_url($url);
$fp = fsockopen ($parsed["host"], 80, $errno, $errstr, 5);
if (!$fp) { $return = "$errstr ($errno)"; }
else {
fputs ($fp, "HEAD $parsed[path] HTTP/1.0\r\nHost: $parsed[host]\r\nAccept-Language: $lang\r\nUser-Agent: Mozilla/4.0\r\n\r\n");
while(!feof($fp)) { $return .= fgets ($fp,128) . "<br>\n"; }
return $return;
fclose ($fp);
}
}
?>
__________________
This place is for RENT
|