Skip to content

srarejai/track_ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

Usage Instruction for package GeoCoding Ip addresses.

  1. For using this package you have to register in the IpInfoDb site and get your free API Key for geocoding IP addresses..

    URL for registering: https://www.ipinfodb.com/register

  2. Include class on top using following line.

use track_ip\Demo\Demo;

  1. In composer.json include following line

"require": { "track_ip/Demo": "dev-master" }

  1. Execute the command

composer update

  1. Add following line to providers array in app.php

track_ip\Demo\DemoServiceProvider::class

  1. Add following line to aliases array

'track_ip' => track_ip\Demo\Demo::class

  1. Use following code in your controller

$ip = $_SERVER['REMOTE_ADDR']; $geo = new Demo(); $format = "json"; // can be raw, xml or json $geovalues = $geo->getGeoLocation($ip, "YOUR IPINFODB API KEY", $format);

  1. Results

statusCode: 100 statusMessage: Error: Invalid Number Of Arguments Passed

statusCode: 101 statusMessage: Invalid Result Format Requested

statusCode: 102 statusMessage: Invalid Ip Format

statusCode: OK statusMessage: IP Geocoded Successfully

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages