Hi Mike
Great! Its working perfect.
Thank you very much.
Best regards,
Henrik
Hi Mike
Great! Its working perfect.
Thank you very much.
Best regards,
Henrik
I think I have found a new bot.
03:30:50 Guest 190.245.218.171 Córdoba, AR 08:23:42am 11:54:32am /wuhistory.php?ID=KILSTRON1&month=2&day=8&year=2017&unitE&mode=2 No User Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1)I don't know what else would be interested in my data for the year 2017 for the last 3 1/2 hours :)
Mark
Since I discovered it, do I get to name it
Here is the fix for that:
edit include-whos-online-geoip.php
change:
$results['print'] = sanitize_output($results["State"]) . ', ' . sanitize_output($results["CountryCode"]);
to:
$results['print'] = sanitize_output($results["City"]) . ', ' . sanitize_output($results["CountryCode"]);
then delete your location_info table
the table will automatically be rebuilt
I will update this in the zip file
Hi Mike
Thank you very much for your help.
Its working perfect in both my Danish and English whos-online.
Best regards,
Henrik
I have updated the zip file with a new version of the State addon plugin
If you are using this state-addon, replace include-whos-online-geoip.php
Thanks to (Jim McMurry - jcweather.us) for the idea and some of the code.
State addon - Version: 1.01 01-Jan-2008
How to use the Nickname feature:
You can edit an IP entry in the location_info table and add a friends name to the “Nickname” field.
When your friend is on your site with the same IP address, the name will show next to the city state like this:
“City, State (name)”
Hi again Mike
New update installed and im now using the Nickname feature. (Instead of the modification which Henkka helped me with)
Everything is working fine.
Best regards,
Henrik
Wow, gone for a few several hours and look what’s happened! Thanks Mike for taking this on and integrating it into the whos-online system. I don’t intend to spend any more time in the InfoSnipe lookup version because this seems much more reliable. A Happy New Year.
This database you used needs to be updated at regular intervals(Every month think ?)
EDIT:the one from Maxmind
I am adding this to the readme of the state-addon:
About once monthly the GeoLiteCity.dat data needs to be updated.
They update it once a month on the first.
Download the latest GeoLite City Binary Format file (28 MB when uncompressed):
http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
After you have downloaded the database, unzip it using a program like WinZip.
Finally upload the GeoLiteCity.dat file to your web site folder on your server using FTP or another upload mechanism.
Replace the file if prompted.
Go to www.yourwebsite.com/whos-online.php
The city and state info should still be working.
When I try to create the tables I get the following error:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘DEFAULT CHARSET=latin1’ at line 14
Are you installing whos-online for the first time?
What step are you on?
yes, installing for the first time.
step 1
That is strange, i just tested it on my server and it worked fine.
Are you using phpMyAdmin to create the table?
Select your database, then…
Copy this and paste into the SQL run query window
--
-- Table structure for table `whos_online`
--
CREATE TABLE `whos_online` (
`name` varchar(64) NOT NULL default '',
`session_id` varchar(128) NOT NULL default '',
`ip_address` varchar(20) NOT NULL default '',
`hostname` varchar(255) NOT NULL default '',
`country_name` varchar(50) NOT NULL default '',
`country_code` char(2) NOT NULL default '',
`time_entry` varchar(14) NOT NULL default '',
`time_last_click` varchar(14) NOT NULL default '',
`last_page_url` text NOT NULL default '',
`http_referer` varchar(255) NOT NULL default '',
`user_agent` varchar(255) NOT NULL default '',
PRIMARY KEY (`session_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `stats` (
`type` varchar(14) NOT NULL default '',
`count` mediumint(8) NOT NULL default 0,
`time` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `stats` (`type` ,`count` ,`time`) VALUES ('day', '1', now());
INSERT INTO `stats` (`type` ,`count` ,`time`) VALUES ('month', '1', now());
INSERT INTO `stats` (`type` ,`count` ,`time`) VALUES ('year', '1', now());
INSERT INTO `stats` (`type` ,`count` ,`time`) VALUES ('all', '1', now());
That is what I did before, but I did try again just to be sure.
Same error. Would it matter that my web server (1and1) is running MySQL 4.0?
Then try this:
--
-- Table structure for table `whos_online`
--
CREATE TABLE `whos_online` (
`name` varchar(64) NOT NULL default '',
`session_id` varchar(128) NOT NULL default '',
`ip_address` varchar(20) NOT NULL default '',
`hostname` varchar(255) NOT NULL default '',
`country_name` varchar(50) NOT NULL default '',
`country_code` char(2) NOT NULL default '',
`time_entry` varchar(14) NOT NULL default '',
`time_last_click` varchar(14) NOT NULL default '',
`last_page_url` text NOT NULL default '',
`http_referer` varchar(255) NOT NULL default '',
`user_agent` varchar(255) NOT NULL default '',
PRIMARY KEY (`session_id`)
) Type=MyISAM;
CREATE TABLE `stats` (
`type` varchar(14) NOT NULL default '',
`count` mediumint(8) NOT NULL default 0,
`time` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`type`)
) Type=MyISAM;
INSERT INTO `stats` (`type` ,`count` ,`time`) VALUES ('day', '1', now());
INSERT INTO `stats` (`type` ,`count` ,`time`) VALUES ('month', '1', now());
INSERT INTO `stats` (`type` ,`count` ,`time`) VALUES ('year', '1', now());
INSERT INTO `stats` (`type` ,`count` ,`time`) VALUES ('all', '1', now());
Version issue. I recreated the db as ver 5 and the query worked.
Hi All
I am trying to get this to work, I now get the following error on my page, can anyone please give some advise?
Thanks
Invalid query: Field ‘hostname’ doesn’t have a default value161C:\Inetpub\wwwroot\wx\include-whos-online-header.phpError in my_thread_global_end(): 3 threads didn’t exit
Seems it could be a bug in MYSQL on your Windows IIS server
http://bugs.php.net/bug.php?id=41350
edit, I see you are on Windows IIS platform.
Windows IIS has a higher rate of troubles for our PHP scripts.
Normally we have better luck with Linux Apache, sometimes you can ask your web host to switch your account.
I am not saying you have to switch, that is up to you. I can still try to help if possible, but you probably need to ask your web host to fix it.
Hi
Thanks for the links, I’m just loading the newest php version … I’m running this on my own server at home, it has both apache and ISS … I’m not sure how to get this to work on apache when everything else to do with my weather disaply is running on ISS … cheers
edit … Now running latest version of PHP with same error …
Try this mysql command on the table and let me know if it helps:
ALTER TABLE `whos_online`
CHANGE `hostname` `hostname` VARCHAR( 255 ) default NULL ,
CHANGE `http_referer` `http_referer` VARCHAR( 255 ) default NULL;