Hi all,
What’s wrong with this code in PHP:
<?php
if (getenv(“HTTP_X_FORWARDED_FOR”)){
$ip = getenv(“HTTP_X_FORWARDED_FOR”);
$client = gethostbyaddr($_SERVER[‘HTTP_X_FORWARDED_FOR’]);
} else {
$ip = getenv(“REMOTE_ADDR”);
$client = gethostbyaddr($_SERVER[‘REMOTE_ADDR’]);
}
$str = preg_split("/./", $client);
$i = count($str);
$x = $i - 1;
$n = $i - 2;
$isp = $str[$n] . “.” . $str[$x];
echo ‘<div>Tu IP es:<b style=“color:880000”> ‘.$ip.’</b> <br><br />
Tu ISP es: <b style=“color:000088”>’.$isp.’ </b></div>’;
?>
It works in a PHP file, but doesn’t work in Scriptcase blank application