Redirection script with some additional features

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

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 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

GujuBoy wrote:
Quoted text here. Click to load it

If you need the ads to change every 20 seconds, you will have to use
something on the client side like JavaScript.

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
been clicked
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
window, which can also be handled with JavaScript.

Hope that helps.

Site Timeline