Page 1 of 1

display visitor flags php script

Posted: Fri Mar 12, 2010 10:41 pm
by Stevyn
i modified a php script to display the flag of the website visitor. you can see the result at the very bottom of this forum.

problem is, it populates the mysql database and never flushes it, so mine at 20 megs crashed.

i dropped the table and re-ran sql

Code: Select all

CREATE TABLE `visits` (
  `id` int(11) NOT NULL auto_increment,
  `ip` varchar(20) NOT NULL default '',
  `refer` varchar(250) NOT NULL default '',
  `page` varchar(50) NOT NULL default '',
  `flag` varchar(10) NOT NULL default '',
  `country` varchar(50) NOT NULL default '',
  `region` varchar(50) NOT NULL default '',
  `city` varchar(50) NOT NULL default '',
  `time` int(11) NOT NULL default '0',
  `vcode` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
);

now it works again but i am going to have to update it so it auto flushes..

the original script is here:
http://www.sinleb.com/scripts/last/index.php

the IP database is here:
http://www.maxmind.com/app/geolitecity