Changeset 2973344
- Timestamp:
- 09/30/2023 03:16:32 PM (18 months ago)
- Location:
- show-visitor-ip
- Files:
-
- 6 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
show-visitor-ip/trunk/readme.txt
r2955804 r2973344 1 1 === Show Visitor IP === 2 2 Contributors: devikas301 3 Tags: ip address, country code, region, lat, long, city, country name, user , visitor, display, shortcode, vs, rockon3 Tags: ip address, country code, region, lat, long, city, country name, user IP, visitor IP, display, shortcode, vs, rockon 4 4 Requires at least: 3.0 5 5 Tested up to: 6.3 … … 35 35 <code>[svip_location type="city"]</code> 36 36 <code>[svip_location type="countryName"]</code> 37 <code>[svip_location type="timeZone"]</code> 38 <code>[svip_location type="currency"]</code> 37 39 38 40 == Screenshots == … … 47 49 * initial release 48 50 51 = 5.1 - 30 September 2023 = 52 * Optimized the coding for better performance. 53 * Fixed the region name issue, not appearing with mobile internet. 54 49 55 == Upgrade Notice == 50 56 51 Th ere is no need to upgrade just yet.57 This is a major security update of this plugin. Ensure to update for better performance. -
show-visitor-ip/trunk/show-visitor-ip.php
r2685418 r2973344 5 5 Description: This plgin show the current user ip address & other location info by ip. Short-code [show_ip], [svip_location type="countryCode"] regarding another shortcode please check the plugin readme file or visit on plugin website. 6 6 Author: Vikas Sharma 7 Version: 5. 07 Version: 5.1 8 8 Author URI: https://profiles.wordpress.org/devikas301 9 9 */ … … 34 34 } 35 35 36 $ip_data = @json_decode(file_get_contents("http:// www.geoplugin.net/json.gp?ip=".$ip));36 $ip_data = @json_decode(file_get_contents("http://ip-api.com/json/".$ip.'?fields=status,country,countryCode,region,regionName,city,lat,lon,timezone,currency')); 37 37 38 39 38 $svip_data = ''; 39 $svip_ltype = $svip['type']; 40 40 41 if($ip_data && $ip_data-> geoplugin_countryName != null){41 if($ip_data && $ip_data->status == 'success'){ 42 42 if($svip_ltype == 'countryCode'){ 43 $svip_data = $ip_data-> geoplugin_countryCode;43 $svip_data = $ip_data->countryCode; 44 44 } elseif($svip_ltype == 'region'){ 45 $svip_data = $ip_data-> geoplugin_regionName;45 $svip_data = $ip_data->regionName; 46 46 } elseif($svip_ltype == 'lat'){ 47 $svip_data = $ip_data-> geoplugin_latitude;47 $svip_data = $ip_data->lat; 48 48 } elseif($svip_ltype == 'long'){ 49 $svip_data = $ip_data-> geoplugin_longitude;49 $svip_data = $ip_data->lon; 50 50 } elseif($svip_ltype == 'city'){ 51 $svip_data = $ip_data->geoplugin_city; 51 $svip_data = $ip_data->city; 52 } elseif($svip_ltype == 'timeZone'){ 53 $svip_data = $ip_data->timezone; 54 } elseif($svip_ltype == 'currency'){ 55 $svip_data = $ip_data->currency; 52 56 } else { 53 $svip_data = $ip_data-> geoplugin_countryName;57 $svip_data = $ip_data->country; 54 58 } 55 59 }
Note: See TracChangeset
for help on using the changeset viewer.