I’m having a strange problem with a PHP script that detects a visitor’s IP. When I call the script directly (e.g., by going to http://www.example.com/iplocation.php), it always returns the correct IP.
However, when I call the script through an EE template using the following code:
<?php
include("http://www.example.com/iplocation.php");
?>
I get the IP of the site’s hosting provider.
Is there anything in EE that could be causing this to happen, or is it entirely unrelated? I thought I’d ask here, since I’m asking everyone who could possibly know ![]()
I tried removing all of the template tags, so the include statement is the only thing in the template file. No cigar.
