How to identify server IP address in PHP

php how to example

How to identify server IP address in PHP   or the server ip: $_SERVER[‘SERVER_ADDR’]; and this for the port $_SERVER[‘SERVER_PORT’]; You can use this in CRUL as below: <?php // create a new cURL resource $ch = curl_init (); // set URL and other appropriate options curl_setopt ($ch, CURLOPT_URL, “http://blog.eduguru.in/test”); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt … Read more