FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free 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 !
Related topics
.htaccess tutorial
no click right mouse
The Unofficial Jokes Thread
Visitor ip PHP (E107)
ip address
ip
What games our you looking foward to?
Looking for a person via his email or IP
[SOLVED] Banning people from visiting my IP Address?
Looking to host myself. Pleas help
Looking for some system ($500, if done right)
Load balancer for Single IP address to multiple web servers
[Solved]Foreign IP Requesting Packets HTTPS
Shared IP
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

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