Hi,
I have my .htaccess redirect all 404's to a page that then sends header(200 : OK). I want to see if the search engines are getting the 200K or if they are just ditching my page because they get a 404.
I don't have telnet accces so I think I need some PHP command to echo the header in full. Please advise me.
Tanks,
J
printing HTTP header in full
Im guessing this is what you're looking for:
http://www.php.net/manual/en/function.headers-sent.php
Oops, thats not it at all, maybe there is some variation of header()? Ill look into it..
Heh, someone posted this on the header() comments:
function get_headers($host, $path = "/")
{
$fp = fsockopen ("$host", 80, &$errnr, &$errstr) or die("$errno: $errstr");
fputs($fp,"GET $path HTTP/1.0\n\n");
while (!$end)
{
$line = fgets($fp, 2048);
if (trim($line) == "")
$end = true;
else
echo $line;
}
fclose($fp);
}
They said that there is no way to read the headers from the page, so you have to open a socket to it (php4 only)