FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

ip looking

 


bykezzap
<?php
$ip = GETENV("REMOTE_ADDR");
echo "Ip Adress: $ip";
?>


for you site and html code
rash52
nice one thankz
liquidplasma6
this code also works,

Code:

<?PHP
$ip=$_SERVER['REMOTE_ADDR'];
echo $ip;
?>
Antoine_935
hummm.. the most simple :
Code:

<?php
echo $REMOTE_ADDR;
?>


Rolling Eyes
SystemWisdom
Umm, Antoine_935, your method requires Auto Globals to be enabled, and that is not a good security practice.. Even though that method would be considerably the easiest, it is only 1 line shorter than the other examples and not worth the security risk..
Antoine_935
security risk ? wow... I've to be careful... thanks !
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.