Jump to content

PHP Hits out script - OFFERING $20 to the SOLVER via paypal


luke777

Recommended Posts

Hi :)

 

At the moment this script works perfect, sends out the number of hits to each site that i want it to.... it stores data in a file named stats.omg

 

What I need is... for it to be changed so that hits are not sent out in bulk, i need to spread the traffic out over the the whole day instead of the sites recieving a bulk of traffic at 1 point in the day.

 

Mabe one way of doing this would be making the script random.

 

Games.php contains:

 

<?php
$urls="http://www.externalsite1.com||200,http://www.externalsite2.com||300,http://www.externalsite3.com||170";
$urls=explode(",",$urls);
$i=0;
foreach($urls as $url){
$url=explode('||',$url);
$sites[$i]['url']=$url[0];
$sites[$i]['hits']=$url[1];
$i++;
}
$omg=file_get_contents('stats.omg');
$handle=fopen('stats.omg','w+');
if(!$omg){
	foreach($sites as $site){
	$stats[]=0;
	}
} else{
$stats=unserialize($omg);
}

for($i=0;$i<=count($sites)-1;$i++){
	if($stats[$i]<$sites[$i]['hits']){
	$stats[$i]++;
	$stats=serialize($stats);
	fwrite($handle,$stats,strlen($stats));
	header("Location: {$sites[$i]['url']}");
	exit;
	}
}
header("location: games.php"); // all hits set, reload and start over
?>

 

If anyone could modify this script for me, please post the new code for games.php in this topic along with your paypal address and i will send you $20.

 

Thanks Luke.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.