PHP code example of kielabokkie / ipdata
1. Go to this page and download the library: Download kielabokkie/ipdata library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kielabokkie / ipdata example snippets
echo $res->country_name; // Australia
echo $res->flag; // https://ipdata.co/flags/au.png
$ipdata = new \Kielabokkie\Ipdata('yourapikey');
$res = $ipdata->lookup();
$ipdata = new \Kielabokkie\Ipdata('yourapikey');
$res = $ipdata->lookup('1.1.1.1');