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.

View Paper
ESSAY DETAILS Words: 372
Pages: 1
(approximately 235 words/page)

Essay Database > Science & Technology > Computers and Cybernetics
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 …

showed first 75 words of 372 total
Sign up for EssayTask and enjoy a huge collection of student essays, term papers and research papers. Improve your grade with our unique database!
showed last 75 words of 372 total
…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]; ?>