Redirect problem

From: Will (bigvortex_at_yahoo.com)
Date: 03/31/04


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.



Relevant Pages

  • Re: Redirect problem
    ... > I downloaded a PHP webcounting script from the web. ... > my home test server but the same thing does not work when I put on my ... that PHP will report the use of uninitialized variables: ...
    (comp.lang.php)
  • SQL Connection Problem
    ... An error has occurred while establishing a connection to the server. ... database location within the applications App_Data directory. ... Boolean& failoverDemandDone, String host, String failoverPartner, String ... user, String password, Boolean trusted, String connectionString) +68 ...
    (microsoft.public.dotnet.framework.aspnet)
  • server-side JavaScript: Prototypes of built-in classes, objects and functins
    ... Session object (disk-based session variables for data persistence ... File class (manipulation of files on server, ie. open, close, read, ... //Methods Cgi.queryCgi.postCgi.anyby default return an empty string if requested var not found ...
    (comp.lang.javascript)
  • Re: App_data - ASPNETDB.MDF
    ... is only because I want my site work, without exception. ... Server Error in '/' Application. ... serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: SSP backup
    ... 2)MOSS_SETUP_FARM is a dbo on the config database. ... Application Server Administration job failed for service instance ... name, ApplicationPoolIdentityType identityType, String userName, SecureString ... password, TimeSpan idleTimeout, TimeSpan periodicRestartTime) at ...
    (microsoft.public.sharepoint.windowsservices)