display banners randomly without refresh

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
phpchild
Forum Newbie
Posts: 20
Joined: Mon Jul 31, 2006 6:27 am

display banners randomly without refresh

Post by phpchild »

hi all,

i have to display the banner in user side without refreshmene. please can any one help me to do this.


Thank u
jito
Forum Commoner
Posts: 85
Joined: Sat Mar 25, 2006 4:32 am
Location: india

Post by jito »

use rand().
phpchild
Forum Newbie
Posts: 20
Joined: Mon Jul 31, 2006 6:27 am

Post by phpchild »

hi

thanks for ur reply. i used random.


but i need auotomatic refresh
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

Use an iframe with an auto refresh tag:

Code: Select all

<META HTTP-EQUIV="Refresh"
CONTENT="30; URL=http://www.example.net/some/place/">
Set the URL property to a PHP script that randomly selects an image and prints it out in an <img> tag.
Post Reply