the code is given below , the code generally works like this scripturl.com/mx/?http://google.com
is it possible to implement script so that it should be able to spin url like
for example when enter the below url in adress bar
scripturl.com/mx/?http://google.com|http://yahoo.com|http://bing.com
it should read randomly one url for example google.com
than when 2nd run on browser it should read yahoo.com
[code]<?php
$script_name = $_SERVER[‘SCRIPT_NAME’];
$current_file = basename(FILE);
$dir = str_replace($current_file,’’,$script_name);
// Extract URI minus http://scriptdomain.com/
$req_url = $_SERVER[‘REQUEST_URI’];
$offer = urlencode(str_replace($dir.’?’,’’,$req_url)); //
$b = str_replace(‘mx/’,‘zy/?’,$dir).$offer;
$txt = ‘’;
$referer = ‘’;
if (isset($_SERVER[‘HTTP_REFERER’])) $referer = $_SERVER[‘HTTP_REFERER’];
if (trim($referer) == ‘’ ) {
//
header('Location: '.urldecode($offer));
exit();
} else {
$txt = ’
';
}
echo $txt;
?>
[/code]