Jump to content

Recommended Posts

Create a file called count.txt

 

And save this a php file.

<?php

$fp = fopen("count.txt", "r");
$count = fread($fp, 1024);

$count = $count + 1;
echo "Page views: $count";

$fp = fopen("count.txt", "w");
fwrite($fp, $count);

fclose($fp);

?> 

 

If  we got many diffrent games does this count overall for all games played or can i put it in each singel game so it counts each singel game?

Link to comment
https://forums.phpfreaks.com/topic/74351-free-php-script/#findComment-375658
Share on other sites

Okay i see, so i need to make a script for each game right?

am just a 19 year old girl, dont know much about this stuff yet, i just started to make my own sites.

I'm just a 15 year old boy :P.

 

And why can't you just use a MySQL database? It makes things allot easier.

Link to comment
https://forums.phpfreaks.com/topic/74351-free-php-script/#findComment-375715
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.