On Fri, Oct 2, 2009 at 17:42, Daniel Brown <[email protected]> wrote:
>
> .... but rather by something just slightly more advanced:
>
> <?php
> $num = file_get_contents('visitcount.txt');
> if(isset($_GET['countme'])) {
> echo "You are visitor #".++$num."<br />\n";
> file_put_contents($num);
> }
> ?>
Converse example (sorry, forgot to add it):
<?php
$num = file_get_contents('visitcount.txt');
if(isset($_GET['countme'])) {
echo "There were ".$num++." people here before you.<br />\n";
file_put_contents($num);
}
?>
--
</Daniel P. Brown>
[email protected] || [email protected]
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php