use this function it does a raw socket r
request... works every time =)
but your path must no have any ip with it
ie i want http://www.yahoo.com/index.html
Get_data("www.yahoo.com","80","/index.html");
function Get_data($server,$port,$mpath)
{
$mpath = sprintf("GET %s HTTP/1.0\n\n",$mpath);
$sp = fsockopen($server,$port,$errno,$errstr,10);
if (!$sp)
{
die("could not connect to shout cast server!");
}
set_socket_blocking($sp,false);
fputs($sp,$mpath);
for($i=0; $i<4; $i++)
{
if(feof($sp)) break; // exit if connection broken
$sp_data.= fread($sp,31337);
usleep(500000);
}
fclose($sp);
return $sp_data
}
good luck
oh still having problems try a http1.1 request.
ie.
www.yahoo.com
GET /index.html HTTP1.1
Host: www.yahoo.com