473,320 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Redirection script with some additional features

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

Jul 17 '05 #1
1 1505
GujuBoy wrote:
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


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.
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jerry | last post by:
Hi All I would very much appreciate your help: I have two scripts alternating in the background triggering themselves mutually. Here is how: 1.) Script A does something and then calls Script...
7
by: LRW | last post by:
Sorry to crosspost, but I have no idea if this is more a PHP question of general Linux question. I have a script that makes changes to image files, montages them into a jpg, and creates a Web...
1
by: slash | last post by:
Hi, I have a page on my website that is driven dynamically off of a database by a perl/cgi script. The page contents are essentially reports of the following url:...
2
by: Rick N. Backer | last post by:
Hello folks, Novice type question here. I'm working with a very simple app here that takes a series of strings from the console. Once the end user has finished inputting the strings they are...
1
by: Andrew | last post by:
I am setting up a web page to collect some data via a questionnaire. The questionnaire part is working fine, but I need some help with one part. I have two different versions of the questionnaire...
15
by: Taki Jeden | last post by:
Hello everybody Does anybody know why w3c validator can not get pages that use 404 htaccess redirection? I set up two web sites so that clients request non-existent urls, but htaccess redirects...
1
by: comp.lang.php | last post by:
require_once("/users/ppowell/web/php_global_vars.php"); if ($_GET) { // INITIALIZE VARS $fileID = @fopen("$userPath/xml/redirect.xml", 'r'); $stuff = @fread($fileID,...
51
by: Ojas | last post by:
Hi!, I just out of curiosity want to know how top detect the client side application under which the script is getting run. I mean to ask the how to know whether the script is running under...
4
by: Neil Gould | last post by:
Anthony Jones wrote: That it is awaiting user action. Since a While/Wend or some other on-going background activity of a script appears to provide exceptions to the above statement, your usage...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.