loading...

How to get Geo location in PHP

katheesh profile image Katheeskumar ・1 min read

I was created a composer package for get GEO Location from the users. This package help to find location info and service provider information.

https://packagist.org/packages/katheesh/visitorinfo

💥 Installation

# install it via composer
composer require katheesh/visitorinfo

💥 To use in your program

require_once __DIR__ . '/vendor/autoload.php';

use VisitorInfo\GetInfo;

$info = new GetInfo;


    // get IP and geographical information about your client
echo $info->getGeoInfo();

    // get service provider information about your client
echo $info->getProviderInfo();

     // get hosting provider information about your client
echo $info->getHostingInfo();

Thank you for your time

😍 Have a good day.

Discussion

pic
Editor guide