Whos Online Script

Hi again!

Are you using the latest version? 1.03? changing the time format settings only changes the display times, not what is stored in the database.

Yes, using 1.03.

The problem is not the timezone, tested with the fix from readme, not helped, my server is in anyway in CET as it should.
The times in visitors-online are basicily correct but they are shown wrongly in 12-hour-format, they should show 23.09 instead of 11.09 as now.

What i meaned with database was, they are stored as 2008-12-14 11:09:27 without any notes about are they am or pm and therefore can’t visitors online show them correct either, this record is actually set at 23:09, not 11:09, hopefully you understand what i mean here.

best regs
Henkka

Try this and let me know if it works for you

edit include-whos-online-header.php

change:

$mysql_now = date( 'Y-m-d h:i:s' );

to:

$mysql_now = date( 'Y-m-d H:i:s' );

Make no other changes in that file.

Let me know if it works like you want, any new records set will have the 24 hour time stored in the database from now on.
Output can still be 12 or 24 hour time based on the time format settings in include-whos-online-settings.php

If this works, i will release it in a new version

Fixed in the current version

Hi Mike

I did the change - and now all times are in 24-hour format.

Thank you very much for your help.

Best regards,

Henrik

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

Try this and let me know if it works for you

edit include-whos-online-header.php

change: Code:

$mysql_now = date( ‘Y-m-d h:i:s’ );

to:
Code:

$mysql_now = date( ‘Y-m-d H:i:s’ );

Make no other changes in that file.

Have now changed it, will tell you how it works once a record has been set :smiley:

Henkka

Hi Mike

I upgraded to version 1.05 and everything is working fine.

Best regards,

Henrik

Mike!

Have now changed it, will tell you how it works once a record has been set
$mysql_now = date( 'Y-m-d H:i:s' );

That fixed it! Now are records in visitors online in 24h format (still on vers 1.03) :slight_smile:

best regs
Henkka

Mike,

Great script, I’ve had fun messing with it all day. Here’s some more geolocators for folks to try. I’m sure none of them are totally accurate, but perhaps one of them will work better in different parts of the world? Right now I’m liking the third one the best.

$C[‘whois_url’] = ‘http://www.ipaddressguide.com/ip2location.aspx?ip=’;
$C[‘whois_url’] = ‘http://geomaplookup.cinnamonthoughts.org/?ip=’;
$C[‘whois_url’] = ‘Locate IP Address Lookup Show on Map City of the IP 95.217.41.22’;

  • Jim

I don’t know how to set up a MySQL database. Does anyone have pointers to
a tutorial that would help me learn how to do it? My host does support MySQL,
so I can give this script a try if am able to set up the database.

Thanks in advance.

-Keith

Most web hosts have a control panel such as CPanel for managing your account. go to the control panel and look for a MySQL menu where you can “ADD” a new database. When you create the database, you enter a database name, a user name and a password. You need to write these down for later use in your script settings. Your host should have a help menu to guide you. If there is a phpMyAdmin icon, you can use that to paste in the sql commands to create the tables. The sql.txt file is included with my script.

Here is a tutorial that covers godaddy
http://www.webhostsdeals.com/how-to-setup-a-mysql-database-using-godaddy

Thanks, Mike. I’ll check out the HowTos you have provided.

-Keith

Cool script Mike. Thank you.

I have been looking over the logs the last few days and I noticed that the GoogleBots seemed to be paying great attention to the wuhistory page. I was watching your script and took notice that the GoogleBot was searching pages that were not there.
http://www.burgus.org/wuhistory.php?ID=KILSTRON1&month=7&day=27&year=2012&units=E&mode=2
Too funny. No wounder I have such a high content count. Several thousand pages according to Google. :slight_smile:

Mark

Mark,

I noticed the same thing. The bots are going through that page with different dates each time because the page calls itself when you select a different date. I added that page to my robots.txt to hopefully put them back on track … we’ll see if that works.

  • Jim

Your choice of the 3rd on you list works allot better for me here. The default one kept bombing out or In-valid IP when I tried clicking on ‘You’ from my home computer.
Thanks

Thanks Jim, i am now using #2 as this is more accurate than any other for my IP :slight_smile:

If you are really into this stuff check out Free Hit Counter Visitor for your Website and web Blog (harrysvr uses it on his site).

You realize this whole thing broke my development site at home? :wink: Now I have to install MySQL at home so the script can find a database. Or can I make it always point to the DB on e-rice?

I have MySQL at home in my linux dev server. :smiley:

Yes you can use a remote database on another web server, that is what this setting is for:
$C[‘dbhost’] = ‘localhost’; // host

‘localhost’ is for the same server, but it can be a web server database address like “mysql.yourhost.com
assuming your host supports remote connections and you use the correct address to connect to.

I’m using one on e-rice & it works fine.

  • Jim

I don’t think e-rice supports remote connections.