alxhotel / freegeoip-php
IP geolocation web server in PHP
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/alxhotel/freegeoip-php
Requires
- php: 5.6
This package is not auto-updated.
Last update: 2025-10-26 01:22:30 UTC
README
DO NOT use this in production
Installation
composer require alxhotel/freegeoip-php
Usage
<?php // Create freegeoip object $freegeoip = new Freegeoip(); // Get client $clent = $freegeoip->client; // Test IP $output = $client->lookup("8.8.8.8"); // Print output print_r($output); /* Array ( [ip] => 8.8.8.8 [country_code] => US [country_name] => United States [region_code] => CA [region_name] => California [city] => Mountain View [zip_code] => 94035 [time_zone] => America/Los_Angeles [latitude] => 37.386 [longitude] => -122.0838 [metro_code] => 807 ) */