Hi,
Thanks for responding.
I have managed to find a way around this. I have added the redirect code to my friends script which first checks the url called. If a condition is met, it redirects otherwise it just continues with the readfile() of my sites script.
But basically, I want everything to be run on my site with a minimum of scripting to be placed on my friends site.
The code was on my friends site :
Loop to retrieve $_Get(params)
$url = "http://www.siteB.com/index.php?$_Get(params)";
readfile($url);
being called from http://www.siteA.com/call.php?info=data1
In http://www.siteB.com/index.php, it GETs the parameters and acts accordingly, giving back info requested.
On the browser, although it has got the data from http://www.siteB.com/index.php it still appears to have been processed on http://www.siteA.com. I have external links on that page, which I want to have tracked.
So I use http://www.siteA.com/call.php?info=data1&go=visit
which tells me a link is clicked.
In my http://www.siteB.com/index.php script, it checks for the go parameter and if present, it should redirect the user to that site.
$url = "url from db based on parameter sent";
Using header("location=$url");
exit;
However, because I am using readfile($url), it still includes the redirect instead of opening the page as http://www.someothersite.com. (it essentially reads the content of someothersite.com and displays it within itself.)
If I use Jscript, as mentioned before, it works, but JScript can be turned off. I wanted to know if I can use php only and basically void the readfile() request and open the page directly instead. If so, how do I do it?
I hope that is clearer, I cannot see any additional code that would help.
I am mentioning include as that is sort of what is happening with the readfile() function.
As usual, any further help would be appreciated.
Jeff