TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

randam splash script (like TPS)

Page: 1 Reply
Sep 3rd 2002#67565 Report
Member since: Sep 3rd 2002
Posts: 22
hey, i really like the random splash on teamphotoshop. (pank) do u think you could release that script? or tell me a place to find a script like it?

thanks mate
Reply with Quote Reply
Sep 3rd 2002#67626 Report
Member since: May 6th 2002
Posts: 46
<*?php
$random = "banners.txt";
$fp = file($random);
srand((double)microtime()*1000000);
$rl = $fp[array_rand($fp)];
echo $rl;
?>

Remove the "*" make a file named "banners.txt" and put the *HTML* of the banners on one line (don't press enter at all unless it's a new one) ex:

>img src=banner.jpg height=83 width=300 border=0<
>img src=banner2.jpg height=83 width=300 border=0<

not..
banner.jpg
banner2.jpg

also, you will need to do this in PHP, if that't not obvious =P

(p.s. this is not my code...someone gave it to me, and it's prolly not theirs either =P...so I don't know who's it is ^_^; )
Reply with Quote Reply
Sep 4th 2002#67629 Report
Member since: Apr 1st 2002
Posts: 1487
[PHP]

$splash=array("image.jpg","image2.jpg","image3.jpg");

Shuffle($splash);

$i=0;$i<0;$i++;

echo "";

?>
[/PHP]very simple. edit as you wish. if you don't know what to edit. let me/us know. :D
Reply with Quote Reply
Sep 4th 2002#67631 Report
Member since: Mar 16th 2001
Posts: 2421
Reply with Quote Reply
Sep 4th 2002#67664 Report
Member since: Sep 3rd 2002
Posts: 22
thanks guys!
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum