Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Anyway To Make A "how Many Times Played" Script?


3 replies to this topic

#1 Triple X

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 390 posts
  • Location:No Where
  • Interests:PS2, computer, music, eh...stuff.

Posted 28 September 2004 - 12:15 AM

http://www.myownworl...ap17.com/games/

I was wondering, is there anyway to make a php script so I can put a thing under the thumbs like "This game has been played # many times" or something? I mean maybe like how many times its been clicked cuz that might work...I dunno I was just wondering. If there is a way(I'm sure there is..) could someone tell me? thanks.

EDIT: oh and yes I have the right to use those games on my site, funflashgames lets you freely do it as long as you have the comment in the source(which I do, I changed it but it gives credit and thats all they ask). I'm going to try google for other ones I can put on it later.

Edited by Triple X, 28 September 2004 - 12:16 AM.


#2 NuHoaXuLa

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 148 posts

Posted 28 September 2004 - 02:26 AM

I think this link is good for this choose :http://www.hotscripts.com/PHP/Scripts_and_Programs/Click_Tracking/

#3 Triple X

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 390 posts
  • Location:No Where
  • Interests:PS2, computer, music, eh...stuff.

Posted 28 September 2004 - 02:40 AM

29$? Not happening....thanks anyway.

#4 minimcmonkey

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:United Kingdom
  • myCENT:62.89

Posted 18 December 2008 - 10:52 PM

Its very easy using PHP and MySQL
You simply need a MySQL database, with one table containing one row, containing a number (and an identifier for using a WHERE statement if you want to do it like that)
Then every time a page is accessed, you access the database, get the number in the database, increment it by 1. and replace the original number with the incremented one.
Of course, this is just page accesses, so you could put in some stuff so each IP is only logged once a day, or, for a play count, you could use a javascript onClick event, so when someone clicks on the flash game, it opens a page in an iframe or a frame with no size, that increments it. This way, web crawlers will not increment the counter, and the counter will only go up if someone clicks on the game!




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users