PDA

View Full Version : Redirect script with statistics, graphs, etc



emke
05-18-2003, 05:00 AM
Maybe this is the wrong place for this topic? If it's, feel free to move it where it's more appropriate.

Until now I've been hiding affiliate links from spiders with java script and that's fine but I would like to use a redirect script so I can track how many people click on a specific link, etc.

I've found a great script at http://www.prolinkz.com/ but it's pretty expensive ($45) and you can only use it on one domain, I'll have several.

I've looked on HotScripts.com but haven't been able to find a good one. Does anyone know of a good free PHP/MySQL script like the one above?

Mike
05-18-2003, 07:35 AM
I think I know what you mean, but aren't 100%...

Couldn't you make a redirection on a page, as well as starting a session. Then, make an if statement saying something like if session exists, add one to database. On a seperate page have this number requested?

As for the graphs, I just don't know...

Sorry if it isn't what you require.

Chris
05-18-2003, 08:01 AM
Its really very very simple.

Make a database table with 2 fields, linkID and linkURL.

Make your links like this:

http://www.example.com/redirect.php?LinkID=1

redirect.php would simply need to read the database and forward the person to the new URL.

If you want to track clicks you'd just add on a third field, total clicks, and increment it before you redirect.

johnn
05-19-2003, 04:43 PM
Make your links like this:

http://www.example.com/redirect.php?LinkID=1

redirect.php would simply need to read the database and forward the person to the new URL.This is a good way to plug holes but at the expense of calling one more query to db.

Chris
05-19-2003, 04:55 PM
One read query shouldn't be a blip on you radar.

You should see how many queries are necessary just to create the front page of this forum.

emke
05-19-2003, 06:40 PM
Thanks for the help Chris. I coded a simple redirect script in like five minutes but I was hoping there was something already available as complex like the script mentioned above as it provides a lot of great statistics, etc. Unfortunately I don't have that much time right now and must confess that I've never worked with graph creation before.

seanf
05-20-2003, 02:32 AM
JpGraph (http://www.aditus.nu/jpgraph/) makes it easy

Sean :)

emke
05-20-2003, 03:44 AM
Originally posted by seanf
JpGraph (http://www.aditus.nu/jpgraph/) makes it easy

Sean :)

thanks, I'll take a look. :)