Newbie question...

He has: 2 posts

Joined: Jun 2004

Hey guys, I'm new. I was wondering if anyone could give me any advice on where to find a PHP script or HTML coding that I can use on my site that will record the number of times a link has been clicked and then display it next to the link? Anyone got any suggestions, I've been looking around the web and forums but I can't find anything about this, any help would be great. Smiling

TargetZion's picture

He has: 76 posts

Joined: Mar 2004

Try Http://www.javascript.internet.com if you're not opposed to javascripts. They may or may not have something to that effect.

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

I don't think it can be done with Javascript, it sounds more like a job for PHP.
Try Hotscripts

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Depends what you mean by "clicked". Do you mean physical mouse-clicks performed in one session by one user? Then Javascript might be sufficient. If you mean "hits", as in total count of anyone who follows a link from your page (referer), then you'll want to use PHP. Clarify? Smiling

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi,

If for one user only:

<?php

 
&lt;script type='text/javascript'&gt;
  var
timesClicked = 0;
  function
doit(divID)
  {
   
document.getElementById(divID).innerHTML = ++timesClicked;
  }
  &
lt;/script&gt;
  ......
  <
input type=button .... onclick=\"originalFunc(); doit('theClicks')\">
  <div id='theClicks'></div>
  .....
 
?>

If for

For php, etal scripts, try:

http://cgi.resourceindex.com/

Vinny

Where the world once stood
the blades of grass cut me still

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.