Advertisement
nateshoffner

Untitled

Nov 10th, 2011
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.29 KB | None | 0 0
  1. <?php
  2. include("geoip.inc"); //library
  3. $gi = geoip_open("GeoIP.dat", GEOIP_STANDARD); //open database
  4.  
  5. //fetch image
  6. <img src="images/country_flags/_' . strtolower(geoip_country_code_by_addr($gi, $ip)) . '.png" title="Server located in ' . geoip_country_name_by_addr($gi, $ip) . '" />
  7. ?>
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement