View Single Post
  #568  
Old 10-11-2024, 06:42 PM
  nauticalstyle's Avatar 
nauticalstyle nauticalstyle is offline
 

Advanced Member
  
Join Date: Jun 2012
Posts: 70
 

Default Re: X-Cart reBOOT (reDUX) Template

I'm working from localhost (IP: 127.0.0.1) using XAMPP on a Windows PC, and LAMPP on a Linux machine. In /reboot/country_redirect.php, the variable defined by...

$details = json_decode(file_get_contents("https://ipinfo.io/{$ip}"));

...does not return a $country_code for $ip = 127.0.0.1, so when it checks if it's a "good country", it returns false, and exits to the /blocked.html page.

To get it to work with localhost I have put a in new if statement to check if the IP address is 127.0.0.1, and then it bypasses the "good country" check.
__________________
Tony
Skipper at Nautical Style
X-Cart Gold Version 4.7.12
X-Cart reBOOT (reDUX) Template 4.7.12.9 (live)
Reply With Quote