Counting how many times a address has been accessed
Posted: Sat Feb 28, 2004 9:39 am
What I would like to do is to store in a file the number of times that a website was visited.
I already have the following extern.php file:
How can I generate, mantain and read from a "extern.txt" file the number of times a user goes to a website; let's say http://localhost/extern.php?catre=www.yahoo.com
Hope this isn't too much but I didn't figured it by myself. Thanks in advance for bothering
I already have the following extern.php file:
Code: Select all
<?php
if (!empty($_GET['catre'])) {
$catre = $_GET['catre'];
} else {
$catre = "null";
}
if ($catre != "null") {
header("Location:http://$catre");
} else {
echo "Dump!";
}
?>Hope this isn't too much but I didn't figured it by myself. Thanks in advance for bothering