Changeset 2523765
- Timestamp:
- 04/29/2021 10:02:22 PM (5 years ago)
- Location:
- seo-redirection/trunk
- Files:
-
- 2 edited
-
common/util.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
seo-redirection/trunk/common/util.php
r2516992 r2523765 310 310 } 311 311 312 return $this->sanitize_req($qry,"url");312 return strip_tags($this->sanitize_req($qry,"url")); 313 313 }else 314 314 { … … 493 493 } 494 494 495 //----------------------------------------------------496 497 public function get_visitor_country()498 {499 $client = @$_SERVER['HTTP_CLIENT_IP'];500 $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];501 $remote = $_SERVER['REMOTE_ADDR'];502 $result = "Unknown";503 if(filter_var($client, FILTER_VALIDATE_IP))504 {505 $ip = $client;506 }507 elseif(filter_var($forward, FILTER_VALIDATE_IP))508 {509 $ip = $forward;510 }511 else512 {513 $ip = $remote;514 }515 516 $ip_data = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ip));517 518 if($ip_data && $ip_data->geoplugin_countryName != null)519 {520 $result = $ip_data->geoplugin_countryName;521 }522 523 return $result;524 }525 495 526 496 //---------------------------------------------------- -
seo-redirection/trunk/readme.txt
r2516992 r2523765 5 5 Requires at least: 4.1 6 6 Tested up to: 5.7.1 7 Stable tag: trunk7 Stable tag: 6.4 8 8 9 9 SEO Redirection is a powerful redirect manager to manage 301 redirects without requiring knowledge of Apache .htaccess files.
Note: See TracChangeset
for help on using the changeset viewer.