Thanx for the reply, works much better. Simple outputing puts all this jargon at the top but no matter, I don't want to redisplay the page, just parse the results so for my purposes, it works great. Thanx! BTW, the line in $out about Host: caused a problem with Google so I removed it - this was my final code.
<?php
$url = "www.google.com";
$fp = fsockopen($url,80,$errno,$errstr,30);
if (!$fp)
{
echo "$errstr ($errno)<br />\n";
}
else
{
$out = "GET /search?sourceid=navclient&ie=UTF-8&oe=UTF-8&q=test HTTP/1.1\r\n";
$out .= "Connection: Close\r\n\r\n";
fputs($fp, $out);
while (!feof($fp))
{
echo fgets($fp, 128);
}
}
fclose($fp);
?>