Skip to content

Latest commit

 

History

History
25 lines (13 loc) · 511 Bytes

README.md

File metadata and controls

25 lines (13 loc) · 511 Bytes

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