Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
April 27, 2005, 2:22 pm
rate this thread
Hello All, I am farely new at PHP....I am looking for a ReDirection
script with maybe the following features
I need to have a "top" banner on my site with circulating banner ads so
that it switches every "20sec" and if users click on it..it will open
the site in a new frame and also keep track of how many times they
click on that banner.
is there anything similar to this? please help
Re: Redirection script with some additional features
If you need the ads to change every 20 seconds, you will have to use
As far as keeping track of how many times someone clicks each banner,
you can do that in php. I have never done anything like this, but I
would think this would be a pretty simple way to do it:
1. Create a database table assigning some sort of unique id to each ad
along with a destination URL and counter for how many times the ad has
2. Create an intermediary page that you go to whenever you click any ad
3. Link every ad to the intermediary page and embed the unique id as a
get variable in the URL
4. When you reach the intermediary page, check to make sure the value in
the get variable is valid and that it exists in the table
5. Increment the counter for this ad by 1 and redirect with a
header("Location: ... ") call to whatever the associated URL is
When you say open in a new frame I assume you mean open in a new browser
Hope that helps.
- » Re ANN: A new scripting language Tao 0.9.0 beta released!
- — Previous thread in » PHP Scripting Forum