Unregistered Avatar

Reply

PHP counter: by mitsurug1


 
LinkBack Thread Tools Display Modes

  #1 (permalink)  

Old 06-10-2004, 08:59 AM

PHP counter: by mitsurug1

THIS TUTORIAL HAS MOVED!!!! CLICK HERE TO FIND IT!

This thread is now used as a dicussion place for the tutorial
__________________

Last edited by Death_Noodle; 03-06-2005 at 05:13 PM.
mitsurug1

mitsurug1 is offline The Samurai

mitsurug1's Avatar

Join Date: Jun 2004

Location: \dev\null

Posts: 60

  #2 (permalink)  

Old 01-23-2005, 10:23 PM

Is there a way that I can use this to count how many time a file has been accessed to use it as a download count or a view count for images?
__________________
[:: CursedProphets :: BlizzCenter :: VDCore :: MeloDeath :: Battleforums ::]


Cold was my soul
Untold was the pain
I faced when you left me
A rose in the rain....
So I swore to the razor
That never, enchained
Would your dark nails of faith
Be pushed through my veins again
jd-inflames

jd-inflames is offline VDC Team Member

Join Date: Feb 2004

Location: Kentucky

Posts: 245

Send a message via AIM to jd-inflames

  #3 (permalink)  

Old 01-24-2005, 11:50 AM

to count file downloads or image views, i would create a database that stores info for each file. This database would hold the file name/ location / info, and an index number.

on your download page it would have links that would point to a download counter, ie: download.php?id=1 or whatever file it was.
Then in your download.php, it would update the download count everytime that page was requested.
missionsix

missionsix is offline http://patandrew.com/

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,922

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #4 (permalink)  

Old 01-24-2005, 02:59 PM

..or you can parse the apache logs for a true count.
mind-spore

mind-spore is offline registered.

mind-spore's Avatar

Join Date: Dec 2004

Posts: 27

  #5 (permalink)  

Old 01-24-2005, 03:07 PM

Quote:
Originally Posted by mind-spore
..or you can parse the apache logs for a true count.
i was going to offer this method as well, although its more complicated. Mind telling me how to go about doing this?
missionsix

missionsix is offline http://patandrew.com/

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,922

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #6 (permalink)  

Old 01-26-2005, 10:00 AM

Here's an Apache log parsing class

http://www.php-editors.com/contest/1/78-read.html

you can look at it and see how it's done.. or just use it... this is how i learned how to parse apache logs.
mind-spore

mind-spore is offline registered.

mind-spore's Avatar

Join Date: Dec 2004

Posts: 27

  #7 (permalink)  

Old 01-26-2005, 03:27 PM

gracias amigo.
missionsix

missionsix is offline http://patandrew.com/

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,922

Send a message via AIM to missionsix Send a message via MSN to missionsix
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP tutorial request Thread: missionsix Website Design 30 09-01-2008 05:37 AM
El Diablo de Lag! The Anti-Bob The VOID! 5 05-01-2006 09:42 PM
PHP view over images: by mitsurug1 mitsurug1 Website Design 0 06-10-2004 08:55 AM
PHP search imdb: by mitsurug1 mitsurug1 Website Design 0 06-10-2004 08:46 AM
PHP random password: by mitsurug1 mitsurug1 Website Design 0 06-10-2004 08:44 AM


All times are GMT -7. The time now is 04:14 PM.