View Single Post
Old 11-12-2012, 10:54 AM  
JamesM
Confirmed User
 
Industry Role:
Join Date: Nov 2012
Posts: 732
you mean you want to redirect surfers to different/random urls from predefined urls.

if this is the case then you can do like this

PHP Code:
<?php
$arr 
= array("url1""url2");
header ("Location: " $arr[array_rand($arr)]); ?>
this will randomly send surfers to one of the url.

you can add many more urls in above code like this

PHP Code:
<?php
$arr 
= array("url1""url2""url3""url4""url5""url6");
header ("Location: " $arr[array_rand($arr)]); ?>
You can even send surfers from specific country to specific url also.

Thanks
JamesM is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook