hyperlink hits counting

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
geeshan
Forum Newbie
Posts: 10
Joined: Fri Mar 24, 2006 12:02 am

hyperlink hits counting

Post by geeshan »

I am an IT student in Sri Lanka. As an assignment we have to implement a library in php.

So what I need to know is how I get the click event of a hyperlink when it is clicked.
I need it because I have to remove the articles which are not seen by anybody.

If you know please help me.

Geeshan
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

redirect the link to an intermediate page which updates a database field in a database

link structure

Code: Select all

<a href="redirect.php?articleid=5">This Article</a>
then on redirect.php, update a timestamp in a database that corresponds with the article id, then redirect to the article. it will be seemless.

then you can run a script to remove articles with aren't viewed within x amount of time
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

geeshan mistakenly posted this to a new thread:
thanks Guru,
But I'm very much new to php.
I know that "redirect.php?articleid=5">" pass the article id to redirect.php.But how I get it to the
varialble in side the redirect.php file.

Geeshan
Post Reply