Your headers:
$headers = getallheaders();
foreach ($headers as $name => $content) {
echo "$name = $content
\n";
}
if (empty($port)) $port="80";
?>
";
//$query= "HEAD ".$url." HTTP/1.0 \r\n\r\n";
//echo $query;
fputs($fd, $query);
$i=0;
while (!feof ($fd) && $i++<100) {
$buffer = fgets($fd, 4096);
echo $buffer."
";
}
pclose ($fd);