Powered By Blogger

Sunday, 31 July 2011

How i can get ip address?

We can use SERVER var $_SERVER['SERVER_ADDR'] and getenv("REMOTE_ADDR") and $_SERVER['REMOTE_ADDR'] functions to get the IP address.


<?php
echo $_SERVER['SERVER_ADDR'];
echo $_SERVER['REMOTE_ADDR'];
echo getenv("REMOTE_ADDR");
?>


No comments:

Post a Comment