Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ip = $_SERVER['REMOTE_ADDR'];
- $record = GeoIP_record_by_addr($gi,$ip);
- $countryid = $record->country_code;
- $countryname = $record->country_name;
- geoip_close($gi);
- $countryallowed = array("AL", "AM", "AR", "AT", "AU", "AX", "BA", "BD", "BE", "BG", "BO", "BR", "BY", "CA", "CH", "CL", "CN", "CO", "CZ", "DE", "DJ", "DK", "DO", "DZ", "EC", "EE", "EG", "ES", "FI", "FR", "GB", "GE", "GF", "GL", "GR", "GY", "HK", "HR", "HU", "ID", "IE", "IL", "IN", "IR", "IS", "IT", "JO", "JP", "KH", "KP", "KR", "KZ", "LB", "LT", "LU", "LV", "LY", "MA", "MD", "ME", "MK", "ML", "MN", "MW", "MX", "MY", "NL", "NO", "NR", "NZ", "PE", "PH", "PL", "PR", "PT", "PW", "PY", "RE", "RO", "RS", "RU", "SE", "SG", "SI", "SK", "SR", "TH", "TR", "TW", "UA", "US", "UY", "UZ", "VE", "VN", "YE", "ZA");
- if(in_array($countryid, $countryallowed)){
- $post['subject'] = "<table border=\"0\"><tr><td><img src=\"" . KU_WEBPATH . "/css/images/cb/" . $countryid . ".png\" title=\"" . $countryname . "\"></td><td>" . $post['subject'] . "</td></tr></table>"; }
- else{
- $post['subject'] = "<table border=\"0\"><tr><td><img src=\"" . KU_WEBPATH . "/css/images/cb/unknown.png\" title=\"Unknown\"></td><td>" . $post['subject'] . "</td></tr></table>";
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement