View Full Version : Redirecting on different server

12-13-2008, 09:40 PM
Hi Guys,

i was wondering what would be the best way to accomplish this:

1) when a user goes to WEBSITE1.COM/INDEX.PHP
2) it triggers code to goto WEBSITE-2.COM/SCRIPT.PHP (without the user knowing which in turn increments view or hits etc)

kind of like quantcast does , you insert code into your site and it gathers all the information and records it.

can this be done with php at all?

thanks for any info guys


12-14-2008, 01:09 AM
Couldnt you just set up a regular redirect on your server (i.e in the control panel you select something like url redirects and you say website1.com/index.php redirects to website-2.php/script.php)?

12-14-2008, 09:20 AM
Not sure if this is what you're looking for


header('Location: WEBSITE-2.COM/SCRIPT.PHP');