Pages

Sunday, November 2, 2014

Get your external IP address

$ curl ifconfig.me

http://ifconfig.me is a web site which shows your public iP address.


If you want use your own code, you can use PHP code such as:


function getip()


{


return "".$_SERVER["REMOTE_ADDR"];


}


echo getip();


?>


Then, you'll get your IP by 'curl yourfile.php'.




commandlinefu.com


by David Winterbottom (codeinthehole.com)






from All commands http://ift.tt/1A11T3R

1 comment:

  1. Nice blog useful for those who dont know anything about how to find their network ip address ..I usually find my system network ip address through sites like Ip-Details.com they will display our network ip address along with details like ip location ,ISP address and so on ...

    ReplyDelete