ב"ה
תנסה את זה:
PHP קוד:
<?php
$url="http://kipa.co.il/";
$url=parse_url($url);
if($url['port']<1)
$url['port']=80;
$fp=fsockopen($url['host'],$url['port'], $errno, $errstr, 30);
if (!$fp) {
echo $errstr.' '.$errno."<br />\n";
} else {
$send = "GET / HTTP/1.1\r\n";
$send .= "Host: ".$url['host']."\r\n";
$send .= "Connection: Close\r\n\r\n";
fwrite($fp, $send);
$file='';
while (!feof($fp)) {
$file.= fgets($fp, 128);
}
fclose($fp);
echo substr($file,strpos($file,'http://'),strpos($file,'Content-Length')-strpos($file,'http://'));
}
?>