Jump to content

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


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.