PHP

Moderators: None (Apply to moderate this forum)
Number of threads: 1848
Number of posts: 5016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Click Count Display Posted by Voodoo_pro on 11 May 2004 at 9:44 PM
I have a question. I want to make a script that displays how many clicks a link has gotten. Now, I know how to do this with just PHP. The problem with that is that the file has to be present already to display a number. I mean, it takes time. You have to do alot of extra coding and input to make it work. I was wondering if anyone has a more dynamic way of doing this, with say, MySQL. I want it so that I don't have to code anything extra for a link that I add. So I can just add a link and add a certian iD to it so its automacticly added. I don't want to have to add code and etc with the link. Ya feel me?
Report
Re: Click Count Display Posted by Manning on 14 May 2004 at 5:04 PM
This message was edited by Manning at 2004-5-14 17:6:15

: I have a question. I want to make a script that displays how many clicks a link has gotten. Now, I know how to do this with just PHP. The problem with that is that the file has to be present already to display a number. I mean, it takes time. You have to do alot of extra coding and input to make it work. I was wondering if anyone has a more dynamic way of doing this, with say, MySQL. I want it so that I don't have to code anything extra for a link that I add. So I can just add a link and add a certian iD to it so its automacticly added. I don't want to have to add code and etc with the link. Ya feel me?


Have it go through a redirect page. So instead of linking to http://www.google.com directly, link to http://www.yoursite.com/link.php?url=www.google.com. Now your link.php script can insert a record into your MySQL database, and then use header("Location: " . $_GET['url']); to redirect to the destination page

(you should have http:// in there too for maximum compatability...but IE screwed up the display if I included that on the example link)



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.