I downloaded a PHP webcounting script from the web. I got it working on
my home test server but the same thing does not work when I put on my
hosting server.
the string that calls the script is:
<a href="webcounte r.php?src=http://www.cnn.com"> CNN </a>
The code that handles it is:
$extra_ext = "redirect:" ;
if (basename($PHP_ SELF)=="webcoun ter.php") {
// we are indexing a different file
$source = $_GET['src'];
$tmp = substr($source, 0, 6);
if ($tmp=='http:/' || $tmp=='https:' || $tmp=='ftp://') {
$location=$sour ce;
$rpage = $extra_ext.$sou rce;
}
else {
$location=$root page.$source;
$rpage = $extra_int.$sou rce;
}
webcounter ($ctype,$rpage) ;
header ("Location: $location");
exit;
}
I can post some more of the code if anyone needs it. On the host server
the string is being formed right but the redirect is not working.
my home test server but the same thing does not work when I put on my
hosting server.
the string that calls the script is:
<a href="webcounte r.php?src=http://www.cnn.com"> CNN </a>
The code that handles it is:
$extra_ext = "redirect:" ;
if (basename($PHP_ SELF)=="webcoun ter.php") {
// we are indexing a different file
$source = $_GET['src'];
$tmp = substr($source, 0, 6);
if ($tmp=='http:/' || $tmp=='https:' || $tmp=='ftp://') {
$location=$sour ce;
$rpage = $extra_ext.$sou rce;
}
else {
$location=$root page.$source;
$rpage = $extra_int.$sou rce;
}
webcounter ($ctype,$rpage) ;
header ("Location: $location");
exit;
}
I can post some more of the code if anyone needs it. On the host server
the string is being formed right but the redirect is not working.
Comment