How do I get the WAN-IP of the current user of my application? I need this to implement IP blocking for abusive actions that users would take. Thanks a lot all!
*Drinking coffee in the morning...*

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
Basic function to get the external IP address.
function getIP
local tIP
try
put URL "http://checkip.dyndns.org" into tIP
put word 6 of tIP into tIP
put replaceText(tIP,"</body></html>","") into tIP
end try
return tIP
end getIP
Code: Select all
checkip.php
<?php
$ip=$_SERVER['REMOTE_ADDR'];
echo "IP Address: $ip";
?>
Lol, I managed to get a fix done 10 minutes after my post above, I used a my revServer-powered hosting to retrieve the IP of the user by simply putting $REMOTE_ADDR...RRobert wrote:RobertCode: Select all
checkip.php <?php $ip=$_SERVER['REMOTE_ADDR']; echo "IP Address: $ip"; ?>