Forum Moderators: coopster
<?
$list = "url1.html, url2.html";
function file_get_contents_randomly($list) {
if (strpos($list,",")) {
$urlArray = explode(",",$list);
$randUrl = array_rand($urlArray,sizeof($urlArray));
for ($sk=0; $sk<sizeof($randUrl); $sk++) {
if ($landingpage=file_get_contents($urlArray[$randUrl[$sk]])) {
return $landingpage;
}
}
}
return "No page Found.";
}
echo file_get_contents_randomly($list);
?>
I'd like to use this to test one affiliate offer vs. another one.
This script works well EXCEPT for the following:
* URL in address bar is not reflecting the new page.
* Images aren't loading from the affiliate site.
Does anyone have an edit to the above script to make this work?
THANKS A MILLION!