Redirect problem
From: Will (bigvortex_at_yahoo.com)
Date: 03/31/04
- Next message: Neal: "Re: PHP control array syntax vs HTML standard"
- Previous message: Gene Kahn: "Re: [NEWBEE] PHP5 RC1 install problem"
- Next in thread: Pedro Graca: "Re: Redirect problem"
- Reply: Pedro Graca: "Re: Redirect problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 31 Mar 2004 03:39:58 GMT
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="webcounter.php?src=http://www.cnn.com"> CNN </a>
The code that handles it is:
$extra_ext = "redirect:";
if (basename($PHP_SELF)=="webcounter.php") {
// we are indexing a different file
$source = $_GET['src'];
$tmp = substr($source, 0, 6);
if ($tmp=='http:/' || $tmp=='https:' || $tmp=='ftp://') {
$location=$source;
$rpage = $extra_ext.$source;
}
else {
$location=$rootpage.$source;
$rpage = $extra_int.$source;
}
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.
- Next message: Neal: "Re: PHP control array syntax vs HTML standard"
- Previous message: Gene Kahn: "Re: [NEWBEE] PHP5 RC1 install problem"
- Next in thread: Pedro Graca: "Re: Redirect problem"
- Reply: Pedro Graca: "Re: Redirect problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|