Forum Moderators: coopster

Message Too Old, No Replies

php content rotator needed low resources

php content rotator

         

jothelion

12:31 pm on Jun 21, 2006 (gmt 0)

10+ Year Member



Hi i've just had to take a content rotator off a site as it was up to 23% resources on a dedicated server i've just got.

Please can someone advise me on a simple low server resources content rotator for text and images.

I've looked at some but they are too complicated I don't need to track other peoples ads etc etc I just need to run mine.

Many thanks in advance for any pointers.

I got to page 15 here in this forum before I posted this as didn't see what I was looking for.

Many thanks

jothelion

eelixduppy

12:38 pm on Jun 21, 2006 (gmt 0)




I got to page 15 here in this forum before I posted this as didn't see what I was looking for.

The best way to search for information is to search it [webmasterworld.com] ;)

Well....depending on what you are doing, there are some ways that this can be done. Here is the easiest way I can think of:


$content = array("content1","content2","content3","content4","content5");
[url=http://us2.php.net/shuffle]shuffle[/url]($content);
echo $content[0];

Or instead of hard-coding the content, have it in pages:


$content = array("content1.html","content2.html","content3.html","content4.html","content5.html");
shuffle($content);
echo [url=http://us2.php.net/manual/en/function.file-get-contents.php]file_get_contents[/url]($content[0]);

Good luck

jothelion

7:47 pm on Jun 21, 2006 (gmt 0)

10+ Year Member



thank you!

I'll search next time! I do remember a time that the search wasn't working so didn't think to try this time! durh :)

jothelion