Jump to content

Free php script!


kfc001

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.