Hi All,
I have a simple php script:
[PHP]
Header("content-type: application/x-javascript");
$serverIP=$_SER VER['REMOTE_ADDR'];
echo "document.write (\"Your IP address has been <font color='red'>tra cked and logged:</font> <b>" . $serverIP . "</b>\")";
[PHP]
That is called via javascript, "script type="text/javascript" src="ip.php"></script>", in order to discourage folder-peekers on my site.
But the following text:
document.write( "Your IP address has been <font color='red'>tra cked and logged:</font> <b>xxx.xxx.xxx. xx</b>")
...shows when you call the script through a browser (Note, script does NOT actually log the IP address).
I've tried changing the file permissions, but the only thing that happens is the script stops working.
Question is: What code can I add to prevent this part of the script from being revealed?
If there is something, I need the actual code.
Thanks much,
Newbie Steph
I have a simple php script:
[PHP]
Header("content-type: application/x-javascript");
$serverIP=$_SER VER['REMOTE_ADDR'];
echo "document.write (\"Your IP address has been <font color='red'>tra cked and logged:</font> <b>" . $serverIP . "</b>\")";
[PHP]
That is called via javascript, "script type="text/javascript" src="ip.php"></script>", in order to discourage folder-peekers on my site.
But the following text:
document.write( "Your IP address has been <font color='red'>tra cked and logged:</font> <b>xxx.xxx.xxx. xx</b>")
...shows when you call the script through a browser (Note, script does NOT actually log the IP address).
I've tried changing the file permissions, but the only thing that happens is the script stops working.
Question is: What code can I add to prevent this part of the script from being revealed?
If there is something, I need the actual code.
Thanks much,
Newbie Steph
Comment