What Is My IP With Geolocation

Overview

A php script that shows the visitors ip address and google maps location.To use the google maps geolocation you need to obtain a google maps api key which can be obtained at this link. –Google maps api key—.

The script can be used without google maps you just need to delete the api key from the text file.

This script can be added to any webpage!

Features

  • Displays the following information about the client that visits your website :
  • IP address
  • Hostname
  • Country code and the Country name
  • Region code and the Region name
  • City
  • Zipcode
  • Timezone
  • Latitude
  • Longitude
  • Metrocode
  • Google maps geolocation
  • Responsive format,It will auto adjust it’s size according to it’s parent div.
  • Object Oriented programming

Requirements

  • PHP 5.6
  • Google maps api key(only if you want to display the geolocation)

Instructions

Unzip the file
Copy the files to the root folder of your website
Add the following lines to the webpage where you want to display the information :
include the initialization file at the top of the file

Include the css file in the head section of the file

Finally include the main script file in the div you want to be displayed.

Related