Country identification PHP script

SPONSORED LINKS

    Specification

  • Version:
  • File size: 0 KB
  • File name: ip_files.zip
  • Last update:
  • Platform: Windows / Linux / BSD
  • Language: PHP
  • Price:GPL
  • Company: Country identification (View more)

Country identification script description:




Publisher review:
This script was originally developed for geolocalization of visitors to authors site. Basic script for country identification of IP

In order to use this script, download compressed Database files in the top of this page, save them within a directory named "ip_files", and use the function bellow to get a two letters country code.

How the function works:

How the function works:
- Line 5: IP address will be split into individual numbers and saved to an array($numbers).
- Line 6: Based in the first number of the IP address ("101" in the example), a PHP file in ip_files/ directory will be included (in the example the file to be included will be "ip_files/101.php"). This file has known country codes for IP addresses starting with the selected first number (p.e: 101.###.###.###, where # is any digit).
- Line 7: IP address is transform into appropriate code.
- Line 8-12: Data from "ip_files/101.php" is checked in order to find a range of codes which includes the code obtained by transforming our IP.
- Line 13: In case IP address is not included in the database, the value for $country will be "unkown".
- Line 14: Two letter country code is returned. In case no matches are obtained, the function will return "" (nothing).
Getting the IP address of visitors and displaying the country

In case we want to identify geographical location of visitors, we must get from them the IP address.

The IP address of visitors will be contained in the enviromental variable $REMOTE_ADDR
Country identification is a PHP script for Networking Tools scripts design by Country identification. It runs on following operating system: Windows / Linux / BSD.

Operating system:
Windows / Linux / BSD

Latest script and internet news

222

222

22

Posted on: 18 Jul 2023 22:27 by A. Brown

111

111

111

Posted on: 18 Jul 2023 22:24 by A. Brown

The permanently active Push system offered by the new Google Chrome 42

The permanently active Push system offered by the new Google Chrome 42

Hacked By !Sc-sT

Posted on: 17 Mar 2015 07:57 by A. Brown

SPREAD THE WORD

User Rating


Rating: 2.2 out of 5
Based on 13 ratings. 13 user reviews.

  • Currently 2.15 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5