Best way to implement a multiuser random ad-system?

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
kawsper
Forum Newbie
Posts: 11
Joined: Sun Jul 10, 2005 12:21 pm

Best way to implement a multiuser random ad-system?

Post by kawsper »

I want to implement a random advertisement system. Where a user could place an html code on their page and get random banners after they have chosen some target groups in the database. I have some problems implementing the system to my users’ sites.

I have troubles makes the link fit to the image in this way:

Code: Select all

<a href=”adRedirect.php?someBanner=4321”><img src=adShow.php?userID=1></a>
I need a breakthrough, I know this can be done in JavaScript but I don’t want to be bound to if the users’ visitor has enabled JavaScript or not.

Can anyone tell me the best way to make this system work the right way?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Best way to implement a multiuser random ad-system?

Post by Christopher »

It seems like all you need is this:

Code: Select all

<a href=”adRedirect.php?userID=1”><img src=adShow.php?userID=1></a>
The adShow.php script would set a Cookie or Session var with the Banner ID, and the adRedirect.php would read the Cookie or Session var to get the Banner ID.
(#10850)
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

moved to PHP Code
Post Reply