DEV Community

кαтнєєѕкυмαɾ
кαтнєєѕкυмαɾ

Posted on

2 1

How to get Geo location in PHP

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
Enter fullscreen mode Exit fullscreen mode

💥 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();

Enter fullscreen mode Exit fullscreen mode

Thank you for your time

😍 Have a good day.

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more