I need the client(customer) ip address of the browser.
This is the client page in php
<?php
$xml_request = '<XMLRequest>
<RequestType>ServiceRequest</RequestType>
<RequestLogin>test</RequestLogin>
</XMLRequest>';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://testserver.com/test_xml/request.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_ENCODING,'gzip');
curl_setopt($ch, CURLOPT_POST, true );
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_request);
echo curl_exec($ch); curl_close($ch);
?>
This is my server page
'http://testserver.com/test_xml/request.php'
in php
$service_request = file_get_contents('php://input');
echo 'Client IP Address: '. $_SERVER['REMOTE_ADDR'];
But here its 'ECHO' my own server IP.
How i get the client browser IP to my server