I\'m using PHP CURL to send a request to a server. What do I need to do so the response from server will include that server\'s IP address?
I think you should be able to get the IP address from the server with:
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://stackoverflow.com"); curl_exec($ch); $ip = curl_getinfo($ch,CURLINFO_PRIMARY_IP); curl_close($ch); echo $ip; // 151.101.129.69