IP2 L ocation PHP Module
|
#4812 |
|
|
Kaan
User is:
Posts: 2772
Meslek: Serbest Meslek
Age: 43
|
IP2Location PHP Module
This module is a PHP module that enables the user to find the country, region, city, coordinates, zip code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code and weather station name that any IP address or host name originates from. It has been optimized for speed and memory utilization. Developers can use the API to query all IP2Location™ binary databases for applications supporting PHP. Mod?l? ?ndir: http://www.ip2location.com/downl.....-4.11.zip Installation To install this module, unzip the package and copy the following files to your web folder. i) IP2Location.inc.php ii) sample-IP2Location.php iii) samples/IP-COUNTRY-SAMPLE.BIN Testing Browse sample-IP2Location.php using any web browser through web server. Public Methods IP2Location_open(filename, mode) Open IP2Location binary database from a local path. IP2Location_get_all(IP2Location, ip_address) Returns an array of country short name, country long name, region, city, latitude, longitude and domain name for an IP address. IP2Location_close(IP2Location) Close IP2Location binary database from a local path. Sample Source Codes : hp]<?php require_once('ip2location.class.php'); $ip = new ip2location; $ip->open('./databases/IP-COUNTRY-SAMPLE.BIN'); $record = $ip->getAll('35.1.1.1'); echo 'IP Address: ' . $record->ipAddress; echo 'IP Number: ' . $record->ipNumber; echo 'Country Short: ' . $record->countryShort; echo 'Country Long: ' . $record->countryLong; echo 'Region: ' . $record->region; echo 'City: ' . $record->city; echo 'ISP/Organisation: ' . $record->isp; echo 'Latitude: ' . $record->latitude; echo 'Longitude: ' . $record->longitude; echo 'Domain: ' . $record->domain; echo 'ZIP Code: ' . $record->zipCode; echo 'Time Zone: ' . $record->timeZone; echo 'Net Speed: ' . $record->netSpeed; echo 'IDD Code: ' . $record->iddCode; echo 'Area Code: ' . $record->areaCode; echo 'Weather Station Code: ' . $record->weatherStationCode; echo 'Weather Station Name: ' . $record->areaCode; echo 'MCC: ' . $record->mcc; echo 'MNC: ' . $record->mnc; echo 'Mobile Brand: ' . $record->mobileBrand; ?> |
Emlak, Oto Galeri, Rent A Car, ?iir, Edebiyat Script Sipari?lerinizi Verebilirsiniz. Detaylar ??in: kaan@ntka.org Seditio 170 ?ndir Capte M?zik ?ndir Seditio Toolbar ?ndir |













