![]() |
|
#1
|
|||
|
|||
Redirecting to Multiple Sites, Each in TurnHi Guys,
I wonder if someone can please advise me on how to do this please. I am a distributor for a company & I want to do some advertising with some fellow colleagues. We all have our own individual websites. The advert will have one web address, which will for each hit redirect to a different website. So for instance, let's say the web address on the advert is http://www.our-advert.com and there are 4 of us sharing the cost of the ad with our own individual sites: Fred: http://www.freds-site.com John: http://www.johns-website.com Jane: http://www.jane-online.com Jill: http://www.jill-on-the.net Now, the first time someone goes onto our-advert.com, it will redirect to Fred's site, the second hit will redirect to John's, the next to Jane's, the next to Jill's and then the next to Fred's and so on and so forth. How do I do this? I am guessing it will have to be in something like php or javascript? Please can anyone advise me on this? Thanks, Jason |
|||
|
#2
|
||||
|
||||
Re: Redirecting to Multiple Sites, Each in TurnYou could do something like this:
PHP Code:
It sets a cookie to keep track of the last site visited. If the cookie is not found, it goes to a random site. On each visit, it updates the cookie. If you want a global counter instead (so that it goes to the next site each time you get a hit from anywhere), you could do this: PHP Code:
This example keeps a text file on the server ("lastsite.txt") which has a number representing the last site visited by anyone. Any time someone goes to your url, the counter in the file is updated, so that the next time someone visits your site, the counter will be updated. __________________
www.blake-foster.com |
Recent GIDBlog
Install Adobe Flash - Without Administrator Rights by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error C2374 | lolp1 | C++ Forum | 3 | 25-May-2008 16:40 |
| Reliable & Affordable.. RVSKIN|PHP5|FANTASTICO|CPANEL and much more.. + Coupon!! | .amaZe | Web Hosting Advertisements & Offers | 0 | 28-Sep-2007 13:33 |
| VPS at ArteryPlanet.Net - Virtuozzo/cPanel/ WHM/Fantastico Multiple Free domain names | arteryplanet | Web Hosting Advertisements & Offers | 0 | 07-Apr-2006 12:23 |
| Linker errors with multiple file progam | nkhambal | C Programming Language | 2 | 24-Apr-2005 02:37 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The