<?php
require_once('geoplugin.class.php');
$geoplugin = new geoPlugin();
$geoplugin->locate();
echo "<a href='/{$geoplugin->countryCode}.html'>Your own country link</a>";
?>
see
http://www.geoplugin.com/webservices/php#php_class
all there is to it ;)