Why does this time out!!!
It should give me a "head" from the
server.
When I try the url in my browser i get
a 404. This is just a small exsamlpe so
dont comment the code 🙂
$urlcheck =("http://www15.brinkster.com/hutsa/dreamcometrue.tif");
$url=parse_url($urlcheck);
$host=$url["host"];
$path=$url["path"];
$fp = fsockopen($host, 80, &$errno,&$errstr, 5);
if (!$fp){
echo("error");
return;}
else {
fputs($fp,"HEAD $path HTTP/1.1\r\n");
fputs($fp,"HOST: " . $host . "\r\n");
fputs($fp,"Connection: close\r\n\r\n");
while (!feof($fp)) {
$output = sprintf("%s%s", $output, fgets ($fp,128));
}
}
Please help me here.