Looking for rotaing redirection script

sapo

Power Member
Joined
Feb 25, 2008
Messages
510
Reaction score
286
I am looking for one that will go down the list, not to be random but, just go down the list.

thanks.


again rep to the one who helps ..
 
D

Deleted member 142434

Guest
Im happy to help, what do you want to rotate each visit randomly or spread equaly?

Is php fine or do you need in another language... And can quickly whip this up as a freebie for +rep :)
 

shubhamm

Junior Member
Joined
Jan 25, 2010
Messages
146
Reaction score
49
if you need in PHP or JavaScript then PM me

it can be done by For Loop/ Foreach

btw

Happy New Year
 
D

Deleted member 142434

Guest
Here you go guys!

Code:
<?php
$url=array(
	'url1',
	'url2',
	'url3'
);
$random=rand(1,count($url));

header ('HTTP/1.1 301 Moved Permanently');
header ('Location: '.$url[$random]);

//echo $url[$random];

?>
 
Last edited by a moderator:
D

Deleted member 142434

Guest
If you need this to read from database or text file... let me know!
 
Top