============================================================ ip2country PHP - PHP - 1 December 2010 ============================================================ Installing ip2country PHP is really quite easy even for a novice php user, just a few simple rules to follow. You will need a server with PHP of course, preferrably 5+ Upload the ip2countryphp directory and its contents to your server, generally it is a good idea to upload this to your htdocs/root dir, make sure you upload the flags folder in BINARY mode and all other files/folders in ASCII mode. Once that is done you can test it works by calling one of the example files, type the url to the example.php file in your browsers address bar and go. You should see your ip info displayed. NB: When testing on a localhost setup like xampp etc... you will probably see 127.0.0.0, Reserved or 0.0.0.0, Unknown ?. This is because the localhost ip is 127.0.0.0 which is reserved or ::1 which is an invalid ip and returns 0.0.0.0 ================= TROUBLESHOOTING ================= If you are calling the ip2countryphp.php class from outside the ip2countryphp directory please make sure the BASEDIR path is correctly pointing to the ip2countryphp directory including the end forward slash / this MUST be a relative path only !!! e.g say if your page is in your htdocs/root dir then you would use define("BASEDIR","ip2countryphp/"); or define("BASEDIR","./ip2countryphp/"); *** IMPORTANT *** You must always keep the same ip2countryphp directory structure, the class file and the "php_files" and "flags" folders MUST be in the same directory. HAVE FUN! ============================ www.ip2countryphp.freei.me ============================