cloudy

Author Topic: Whos Online Script  (Read 42027 times)

0 Members and 1 Guest are viewing this topic.

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Whos Online Script
« on: December 12, 2008, 07:37:33 AM »
What do you think of my new Who's Online script?

Who's Online PHP Script by Mike Challis

Version: 1.01 - 14-Dec-2008
- I moved all the settings to a include-whos-online-settings.php to help make updates easier
- fixed missing language setting TEXT_VISITORS_ONLINE_NOW
- added more error traps, one to catch a missing spiders.txt
- fixed extra <tr> on whos-online page messing up HTML validation.
- added date and time format settings
upgrading from version 1.00 requires reading the readme.txt again, the steps have changed
database requires no changes.

Version: 1.02  14-Dec-2008
- fix for Fatal error: Call to undefined function check_for_settings()
- fix for empty records dates/times
upgrading from version 1.01 requires replacing include-whos-online-page.php and include-whos-online-header.php

Version: 1.03  14-Dec-2008
- added one more time format setting to include-whos-online-settings.php
// time format displayed on 'Entry' and 'Last Click' time on the whos-online page
// 'h:i:s' would be 02:25:25
$C['time_format_hms'] = 'h:i:s';
to upgrade from 1.02
replace include-whos-online-page.php and add this setting to your include-whos-online-settings.php

Version: 1.04  14-Dec-2008
- fix for show bots checkbox being ignored
to upgrade from 1.03, replace include-whos-online-page.php

Version: 1.05  14-Dec-2008
- fix time format issue with records for users who want to select 24 hour time display
to upgrade from 1.04, replace include-whos-online-header.php

Version: 1.06  18-Dec-2008
- added mysql link identifier to each mysql call (for better compatibility if you have another mysql app in your site template, ie: wordpress)
to upgrade from 1.05, replace include-whos-online-header.php and include-whos-online-page.php

Version: 1.07  20-Dec-2008
- added country flags addon feature, installing this addon will add Country Flags next to each IP address on your whos-online.php page
see 'country-addon' folder readme.txt in the zip file for more info
to upgrade from 1.06, replace include-whos-online-header.php and include-whos-online-page.php and add this setting to include-whos-online-settings.php
// enable ip-to-country lookups
// requires installing the country-addon plugin
// enabling this will cause an error if you have not installed the plugin!
$C['enable_country_lookup'] = 0; // 1 enables, 0 disables

Version: 1.08  21-Dec-2008
- bug fix, 1.07 was broken, the country flags all showed "g"
to upgrade from 1.07, replace include-whos-online-header.php

Version: 1.50  22-Dec-2008
- lots of changes for the new password protect feature
- changed default settings for refresh, profile_display, ip_display, last_url_display, referer_dispay to disabled for the most conservative privacy.
- added password protection feature with several options, you can enable it in include-whos-online-settings.php be sure to change the default password!
 
to upgrade from 1.08, replace include-whos-online-settings.php (re-configure your settings), include-whos-online-page.php, whos-online.php
non-carterlake users will also need to revisit Step 3 and Step 6 of the "Installation (any other php template sites)" section in the readme.txt file

Version: 1.51  22-Dec-2008
- fixed bug where IP addresses sometimes were not showing when logged in
to upgrade from 1.50, replace include-whos-online-page.php

Version: 1.52  31-Dec-2008
- fixed refresh not working when login enabled and logged in
- added a new state-addon plugin to show "city, state" next to country flags, see 'state-addon' folder readme.txt
- thanks to (Jim McMurry - jcweather.us) for the idea and some of the code.
to upgrade from 1.51, replace whos-online.php, include-whos-online-page.php, and include-whos-online-header.php

I think I got all the bugs worked out, it should be stable now.

Download         
http://www.642weather.com/weather/scripts/whos-online.zip

Live Demo     
http://www.642weather.com/weather/whos-online.php
My whose-online page is password protected to protect my site visitors privacy
I include a screenshot of the whos online page in the zip file (with ip addresses blanked out)

Features:
Shows Search bots, Visitors, and You
admin only password protection option to protect your site visitors privacy
Time online
Entry Time
Last Click Time
IP Addresses
IP Lookups
Last URL Visited
Referrer URL
Visitor count
Language variables, easy to translate
Includes a carterlake php template page and it is style switcher compatible

Options: Show or hide Bots, Refresh rate, Profile display

It uses a MySQL database.
Visitors are considered inactive after 5 minutes. Removed after 15 minutes.

This is not a page hit counter or page view logger, you can use google analytics or webalizer for that.

Note: I force the style to wide on this page because it needs a wide table.

This script only supports PHP files in a template site at this time.
Later on I might add a feature to support html page activity by using a very small pixel image hit.

This is inspired by the osCommerce contribution "Who's Online Enhancement"

This is new ...
If you have any ideas for more features, let me know

If you try it please let me know, thanks
« Last Edit: January 01, 2009, 03:51:52 AM by MCHALLIS »

Offline broadstairs

  • Stuart
  • Posts: 6,249
  • Broadstairs, Kent, UK
    • Broadstairs
Re: Whos Online Script
« Reply #1 on: December 12, 2008, 07:53:19 AM »
Now that's something I'd like to use......

Stuart

Bashy

  • Guest
Re: Whos Online Script
« Reply #2 on: December 12, 2008, 10:10:47 AM »
What a great idea, would it be able to parse the info into a small box on the index page
with the details of whos online (or amounts) and then have a link to that page?

Offline CNYWeather

  • Professional Trophymaker!
  • Posts: 1,440
  • Rome, New York
    • CNYWeather.com
Re: Whos Online Script
« Reply #3 on: December 12, 2008, 11:52:13 AM »
Very COOL!!
Tony

CNYWeather.com
CWOP: CW2352
WeatherUnderground: KNYWESTM1


http://www.CNYWeather.com

I Make Trophies Too!
http://www.speedyawards.com

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Whos Online Script
« Reply #4 on: December 12, 2008, 01:33:48 PM »
Hi Mike

WOW - thats looking great - I would certainly be interested to implement it to my site.

Best regards,

Henrik

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Whos Online Script
« Reply #5 on: December 12, 2008, 01:37:38 PM »
Hi again

Just thought of a suggestion:

Would it be possible to show what contry (maybe presented by a flag?) the visitor comes from?

Best regards,

Henrik

Offline skyewright

  • Posts: 1,996
  • Isle of Skye, Scotland
    • 24 Elgol
Re: Whos Online Script
« Reply #6 on: December 12, 2008, 01:37:55 PM »
I like it.  :D
Regards
David

Offline Zalmor

  • Posts: 550
  • Erin, NY
    • Zalmors' corner of the Web
Re: Whos Online Script
« Reply #7 on: December 12, 2008, 02:23:05 PM »
What do you think of my new Who's Online page?

I like it  :wink:
Michael A

Windows XP Pro SP3, Pentium D 2.80GHz 3GB RAM, Quickcam Pro 4000, and APC

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Whos Online Script
« Reply #8 on: December 12, 2008, 02:43:04 PM »
Hi again

Another suggestion:

Would it be possible to manually input the owner of the IP adresses into the database? In that way the owner of the IP adress could be presented.

Ie. I know a lot of my users IP adresses - in that way it would be easy to see who is online by name.

Best regards,

Henrik

mth

  • Guest
Re: Whos Online Script
« Reply #9 on: December 12, 2008, 03:21:51 PM »
I'd love to have this but e-rice charges for an additional SQL database.   :(

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Whos Online Script
« Reply #10 on: December 12, 2008, 04:43:06 PM »
Keep suggesting features
I might add more.

One feature I am going to add is an option to hide the IP addresses from the general public so they are visible to the admin only.

Offline Traj

  • Posts: 265
  • Weather is for the birds.
  • Woonsocket, RI USA
    • We do stuff...
Re: Whos Online Script
« Reply #11 on: December 12, 2008, 04:48:36 PM »
Keep suggesting features
I might add more.

One feature I am going to add is an option to hide the IP addresses from the general public so they are visible to the admin only.

I think that's a good idea.  Some casual visitor might feel creeped out by it.



Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Whos Online Script
« Reply #12 on: December 12, 2008, 04:56:08 PM »
What a great idea, would it be able to parse the info into a small box on the index page
with the details of whos online (or amounts) and then have a link to that page?

How about this much:
22     Visitor(s) online
18    Guests, 8 are active.
3    Bots
1    You


make the "Visitor(s) online" a clickable link

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Whos Online Script
« Reply #13 on: December 12, 2008, 04:59:26 PM »
Hi again

Another suggestion:

Would it be possible to manually input the owner of the IP adresses into the database? In that way the owner of the IP adress could be presented.

Ie. I know a lot of my users IP adresses - in that way it would be easy to see who is online by name.

Best regards,

Henrik

That sounds like a feature I probably would not add, but if I release the script, you can modify it anyway you like.  :)
« Last Edit: December 12, 2008, 05:03:46 PM by MCHALLIS »

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Whos Online Script
« Reply #14 on: December 12, 2008, 05:02:48 PM »
Hi again

Just thought of a suggestion:

Would it be possible to show what country (maybe presented by a flag?) the visitor comes from?

Best regards,

Henrik

This is a feature I will add in a future update.
It will be an option you can turn on or off.
Enabling it will require my 'country to ip script' also be installed.
http://www.642weather.com/weather/ip-to-country.php
« Last Edit: December 14, 2008, 08:21:10 PM by MCHALLIS »

 

cumulus