Whos Online Script

I probably should have been more clear. The web page and DB on e-rice works fine. But the same web pages on my development site at home is failing because I don’t have MySQL there and, therefore, a local DB for it to connect to.

Hi Mike, am I blind or is there not a link on your website for this script?
Thanks for all your work on this.

Not a link on my site yet, you guys are my beta testers first. :lol:

Ah!
Thanks. :slight_smile:
Thought of adding this the other night, and was too lazy to look through this thread for the link. 8)

Are you remotely accessing the DB on e-rice? If so what’s the format of the path?
Never mind. I found where e-rice states they don’t allow remote mysql access.

I’m curious as to why my Last refresh, Entry and Last Click times are in CST
but my records are in UTC? You can see what I mean at http://www.sohiweather.com/whos-online.php

Mike

Try this section from the readme.txt “Known issues”:

Problem:
sometimes the times for the visitors online are not in your desired timezone:
If your server is in a different time zone and you desire a time offset, here is how…

Solution:
(carterlake php template sites)
correctly set the timezone setting inside Settings.php
$SITE[‘tz’]

(non-carter lake template users)
change America/Los_Angeles if needed and put this code in your Settings.php file right above the code you put in during Step 6)

// this sets the timezone for this php script
// http://saratoga-weather.org/timezone.txt has the list of timezone names
// pick the one that is closest to your location
$myTZ = 'America/Los_Angeles';
putenv("TZ=$myTZ");

Let me know how it goes

That changes it so the UTC now says CST but time is still wrong.

Max visitors today: 14 at 09:15 pm CST
This month: 14 at 12-17-2008 09:15 pm CST
This year: 14 at 12-17-2008 09:15 pm CST
All time: 14 at 12-17-2008 09:15 pm CST

9:15 pm is a bit in the future. :lol:

Records set before you have changed this timezone setting will remain at the wrong times because they are already stored in the database, you can edit them with phpMyAdmin

If I get time I might make some code to reset them, but I am working on something else right now.

Ok, edited the values back down to 1 and it’s all working now.
Sorry I didn’t pick up on that known problem but since one time
was correct and the other wasn’t I thought it was a different
problem.

Mike

This one is showing up as a visitor.
65.55.107.203
msnbot-65-55-107-203.search.msn.com

Mark

Love this script!

It might be able to be recognize it but I would need to know the user agent.
You can see user agents if you select profile display “All”

It has been reported that msn has a search link quality bot.
The MSN search link quality bot uses user agent strings of actual browsers, so it’s hard to identify.
Those are MSN’s cloaking detectors, originating from 65.55.xx.xx. They are spiders that access your site using regular User Agent strings, rather than normal spider strings. MSN uses them to ensure that the same content is provided to both the search spider and regular users, as some web pages serve up bogus content to spiders in order to drive traffic to their site. They are a nuisance, but cannot be detected by strings in spiders.txt.

Spiders.txt contains fragments of User Agent strings.
The spiders.txt file holds the list of bots (spiders)
This is the free list I use, periodically you can get updates here:
http://www.oscommerce.com/community/contributions,2455

Great script works well.

Thanks,

Ed

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

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

I am at a loss as to where in Settings.php this goes. Everytime I insert it in the code my whole website goes away. I need help, please.

// include the who’s online functions
require (‘include-whos-online-header.php’);
$whos_online_records = update_whos_online();

I put mine at the very top just after the php like this

<?php

$myTZ = 'Europe/London';
putenv("TZ=$myTZ");
require ('include-whos-online-header.php');
  $whos_online_records = update_whos_online();

############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (WD-World template set)
############################################################################

Thanks, Bashy…that should do the trick. :smiley:

Well…that didn’t help. Everytime I put that anywhere the whole site goes away.

There might be a PHP error and your server is configured not to display PHP errors

I have two lines of PHP code to turn on error reporting, try putting this in your Settings.php file right after the open php tag

<?php ``` error_reporting(E_ALL ^ E_NOTICE); // Report all errors except E_NOTICE warnings ini_set('display_errors', 1); // turn error reporting on ```

The server doesn’t like the following line:
require (‘include-whos-online-header.php’);

This is the error:
Warning: require(include-whos-online-header.php) [function.require]: failed to open stream: No such file or directory in /home/content/l/u/l/lulu836/html/wx/Settings.php on line 8

Fatal error: require() [function.require]: Failed opening required ‘include-whos-online-header.php’ (include_path=‘.:/usr/local/php5/lib/php’) in /home/content/l/u/l/lulu836/html/wx/Settings.php on line