PX : code

You have been here.. by Neil Edwards
Download this code


<?php
/* A You have been here... script
   By Neil Edwards
   neiled@clara.net
                                           */


if ($Test != '')   //if there is a cookie stored
{
$Test++;   //increase the value of $Test by 1
SetCookie("Test",$Testtime()+3600000);   //Set the cookie with the name
}
else  
//else if the cookie does not exist
{
SetCookie("Test",1time()+3600000);  //Create one with the value of 1
}
?>

<?php
// Put this somewhere else in your page
echo("You have been here ");  //Display You have been here
echo $Test;   //$Test
echo (" times");   //times. This is all on one line
?>

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.