function get($ip,$port,$path)
{
$res="";
$sock=fsockopen($ip,$port, $errno, $errstr, 30);
if(!$sock){
echo $errstr($errno);
}else{
$headers = "GET $path HTTP/1.0rn";
$headers .="Host: masteram.us";
$headers .="User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14rn";
$headers .="Accept-Language: ru,ru-RU;q=0.9,en;q=0.8rn";
$headers .="Connection: Closernrn";
}
$res .=fgets($sock, 1024);
}
return $res;
}
foreach($file as $key=>$value)
{
$get=get($ip,$port,'http://masteram.us/');
}