• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Good php and mysql ad system.

Koolguy

New Member
Could you recommened a good mysql and php ad rotation system. Im currently using the one from phpwizard but I'm having problems with the banners being displayed equally.
 
Theres a patch

Yeah, I had the same problem when I downloaded it, but its pretty easy to fix. I found the patch on the phpAds support board. In view.inc.php3 and kcsm.php3, change srand((double)microtime()*1000000); to srand (time());
Hope it helps :)
 
Didn't work

I did exactly what you said but it still didn't change anything, the four ads are the only ones that are being displayed. aAy ideas?
 
I got it working with this code:

function myshuffle($array)
{
mt_srand((double) microtime() * 1000000);
$num = count($array);
for ($i = 0; $i < $num; $i ++)
{
$n = mt_rand(0, $num - 1);
$temp = $array[$n];
$array[$n] = $array[$i];
$array[$i] = $temp;
}

}
 
Back
Top