|
Here is a simple script to test any sponsors against each other. Just add your traffic links and name the file index.php If you want to test more than 2 urls at once let me know and I will send you a new script.
<html>
<?
$url_a = 'http://www.aol.com';
$url_b = 'http://www.gfy.com';
$goto = '';
$shm_key = ftok(__FILE__, 't');
$shm_id = shmop_open($shm_key, "c", 0644, 100);
$data = shmop_read($shm_id, 0, 1);
if (($data!='1') && ($data!='2'))
{
$shm_bytes_written = shmop_write($shm_id, '1', 0);
$data = 1;
}
if ($data=='1')
{
$goto = $url_a;
$bw = shmop_write($shm_id, '2', 0);
}
if ($data=='2')
{
$goto = $url_b;
$bw = shmop_write($shm_id, '1', 0);
}
shmop_close($shm_id);
//echo 'Redirecting to: '.$goto.'!';
header('Location: '.$goto);
die();
?>
</html>
|