3
Software Requirements:
Crypt_HMAC:
http://pear.php.net/package/Crypt_HMAC
HTTP_REQUEST:
http://pear.php.net/package/HTTP_Request
PEAR:
http://pear.php.net/
Crypt_HMAC:
http://pear.php.net/package/Crypt_HMAC
HTTP_REQUEST:
http://pear.php.net/package/HTTP_Request
PEAR:
http://pear.php.net/
1
Outputs the number of guests online / people browsing the page.
Using PHP and a text database.
Copy and paste this code into your PHP source code where you would like the count number to appear.
If you would like it in more then one place, just include the code once and echo out $Online_Guests
Create a file named 'online.txt' and upload it to the same drive as the web page, set permissions to read and write.
The "$TimeoutOnlineMinutes" is the amount of minutes to timeout guests, you may want to change this to a lower amount if your site is viewed often.
Using PHP and a text database.
Copy and paste this code into your PHP source code where you would like the count number to appear.
If you would like it in more then one place, just include the code once and echo out $Online_Guests
Create a file named 'online.txt' and upload it to the same drive as the web page, set permissions to read and write.
The "$TimeoutOnlineMinutes" is the amount of minutes to timeout guests, you may want to change this to a lower amount if your site is viewed often.
10
This simple function will check if a url is valid (going by parse_url()) and if it's 'online' - by seeing if it returns a 302, 301, or 200 status code.








