| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| View Counter | |
|---|---|
| Tweet Topic Started: Aug 14 2005, 06:27 PM (728 Views) | |
| Auron89 | Aug 14 2005, 06:27 PM Post #1 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I'm having trouble finding a decent script which counts the amount of hits a certain link/image link recieves. Can anyone help? (I'm sure it's done through PHP - I may be wrong!)
|
![]() |
|
| IceMetalPunk | Aug 14 2005, 08:45 PM Post #2 |
|
We are all IMPerfect. Be proud!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Well, you would have to make the page/image actually a PHP script. For example (for images), instead of "http://www.domain.com/image.gif", you would make a PHP script called "http://www.domain.com/image.php?img=image.gif". In image.php, you would do this:
Then on your server, there will be created files called "imagehits*.php", where the * is replaced by the image filename. Inside those files will be h=the number of hits it got. Instead of an image, if you want a link, then rename that page with a .php extension and add this at the end:
This will give the same outcome as the image one, except the filenames will be "hits*.txt" where the * is replaced by the filename of the page. -IMP
|
![]() |
|
| Auron89 | Aug 14 2005, 08:47 PM Post #3 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Right, thanks very much. I'll try that.
|
![]() |
|
| mobashirkhan | Aug 22 2005, 12:46 AM Post #4 |
|
Member
![]() ![]() ![]()
|
how and where can i put that code and tell me where can i edit my picture??? |
![]() |
|
| Veris | Aug 22 2005, 07:24 AM Post #5 |
|
Kaput!
![]() ![]() ![]() ![]() ![]()
|
Yea, but when using the php script, instead of changing all your images, cant you just change it from index.html to index.php. |
![]() |
|
| mobashirkhan | Aug 22 2005, 12:08 PM Post #6 |
|
Member
![]() ![]() ![]()
|
i still can't understand that what r u trying to say??? tell me in detail plz |
![]() |
|
| Auron89 | Aug 22 2005, 03:59 PM Post #7 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Maybe you should make your own topic? This one is kinda old. |
![]() |
|
| IceMetalPunk | Aug 22 2005, 04:34 PM Post #8 |
|
We are all IMPerfect. Be proud!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Yesh, it is, but... @mobashirkhan: You need to put it in a file with a .php extension and host it on a server that allows PHP (Ripway is a good one). @Illuminatie: No.... I think you are a little confused. The index.php or index.html file is independant from the images. While they may include images, the images are loaded from separate files, hence the need for the SRC property of the <img> HTML tag. By making the SRC a single PHP file and just changing the filename after the ?img= in the URL to the PHP file, you do not need to change any images, but rather you only need to change the SRC in the <IMG> tags. -IMP
|
![]() |
|
| mobashirkhan | Aug 23 2005, 04:42 AM Post #9 |
|
Member
![]() ![]() ![]()
|
oohhh thanxbrother |
![]() |
|
| Veris | Aug 23 2005, 04:45 AM Post #10 |
|
Kaput!
![]() ![]() ![]() ![]() ![]()
|
Alright, i've seen different ways to do it. |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Technology Chat · Next Topic » |
| Track Topic · E-mail Topic |
10:13 AM Jul 11
|



![]](http://b1.ifrm.com/0/1/0/p601690/pipright.png)



10:13 AM Jul 11