display visitor flags php script

Let us talk about scripts, HTML, Perl, PHP, apache, etc.
User avatar
Stevyn
SysOp
Posts:1776
Joined:Mon Nov 09, 2009 10:03 am
Location:Japan
Contact:
display visitor flags php script

Post by Stevyn » Fri Mar 12, 2010 10:41 pm

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
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

Post Reply