Guest User

Untitled

a guest
Mar 31st, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. <?php
  2.  
  3. $ip = $_SERVER['REMOTE_ADDR'];
  4. $details = json_decode(file_get_contents("http://ipinfo.io/{$ip}"));
  5. if($details->country == "CN")
  6.     die("Китаёз заблокировали тут :(");
  7.  
  8. //остальной контент
  9. //...
  10.  
  11. ?>
Advertisement
Add Comment
Please, Sign In to add comment