How to get visitor IP details using PHP and MySQL

Today we are going to learn how to get visitor IP details using PHP and MySql. For this tutorial i have used PHP classes to get IP details from Databases. It is useful to handle your visitors like IP based banned, For analytics, For translation and much more ….


  • Convert IP into  numerical Value
  • IP registry
  • IP country RIR (Regional Internet Registry) representation
  • IP Country
  • IP range

It is simple to use.

Database table structure:

IP dump have given in this script package



Reference :

Demo and Download



Please don’t forget to share and subscribe to latest updates of the blog .