install GeoIP2-php without using composer (manually)

Viewed 2751

how i can install GeoIP2 PHP without using composer and Dependencies (Just manually) , what classes i need to include . should i use __autoload function ? ,

<?php 

require_once 'vendor/autoload.php';
use GeoIp2\Database\Reader;

// This creates the Reader object, which should be reused across
// lookups.
$reader = new Reader('GeoLite2-City.mmdb');

// Replace "city" with the appropriate method for your database, e.g.,
// "country".

$Ips = array('105.155.240.8');

$record = $reader->city('31.147.255.255');

print($record->country->isoCode . "\n"); // 'US'


?>
0 Answers
Related