PHP code example of p-12s / get-country-code-by-ip

1. Go to this page and download the library: Download p-12s/get-country-code-by-ip 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/ */

    

p-12s / get-country-code-by-ip example snippets


// inder = new CountryCodeFinder\CountryCodeFinder();
echo $finder->getCode('178.200.170.41'); // DE
echo $finder->getCode('176.31.69.179'); // BE