Forum Moderators: coopster

Message Too Old, No Replies

Dynamic Page / Urls

         

prometeus

12:28 pm on Mar 5, 2005 (gmt 0)

10+ Year Member



I have a site that creates custom links from an rss feed.
And stores them in a database there are now over 28000 records in the database.

I now want to create a simple (Keep It Simple)click counter so that I can show on the page the most clicked / popular url's

Every url will redirect you from my site.
I'm only started next week with mysql and php and website building but my site now already receives 5000 visitors every day.

orion_rus

6:19 pm on Mar 5, 2005 (gmt 0)

10+ Year Member



) it's have to ways.
You create a file redirect.php
1. u call a url like redirect.php?url=http://www.somesite.com
in redirect.php
you have a
$url=$_GET['url'];
$db->query('insert into urls values($url)');
header('Location: '.$url);
this table urls would contain urls what were clicked
or you can make a special id for each url seems like random sequence of letters. And make appropriate insert into db and then change db statistics make redirection
Good luck to you

prometeus

6:37 pm on Mar 5, 2005 (gmt 0)

10+ Year Member



thanks gonna play with that!

prometeus

12:13 pm on Mar 8, 2005 (gmt 0)

10+ Year Member



Thanks it worked really sweet!