A simple ad rotation program written in php, which uses a simple text file to revolve your ads. No need to get any databaseor CGI scripting.

Date Submitted: 09/10/2006 00:35:04
Category: / Science & Technology / Computers and Cybernetics
Length: 1 pages (372 words)
A simple ad rotation program written in php, which uses a simple text file to revolve your ads. No need to get any databaseor CGI scripting. You canalso use this concept to revolve contents on your site. <?php /* Author : Syed R Fayyaz Comments : There are many ad rotating scripts out there most of them are in Java, I wanted to have this done in PHP. Here is a simple script to revolve your …
Is this Essay helpful? Join now to read this particular paper
and access over 480,000 just like this GET BETTER GRADES
…your text file $fcontents = join ('', file ('textfile.txt')); //Spliting contents of file by looking for ~ mark between codes //and storing everything into an array. $s_con = split("~",$fcontents); //getting a random number which will be within the limit of the //contents of the file, means if 5 different banners/ads then the number //will be between 0-4 (total 5 ) $banner_no = (rand()%(count($s_con)-1)); //simple scho banner echo $s_con[$banner_no]; ?>
Need a custom written paper? Let our professional writers save your time.