Skip to content

mostafaabdelbaset/laravel-ip-service

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel IP Service

Tries to guess the country code of the client, using his IP.

Installation

Download and import the ip database from ip2nation.com

Usage

$service = App::make('Dimsav\IpService\IpService');


// country code for the given ip address

echo $service->getCountryCodeFromIp('123.123.123.123');


// country code for the client's ip address

echo $service->getCountryCodeFromClientIp(); 

About

A Laravel package to get the user's country using the ip. A wrapper for http://ip2nation.com

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%