I've set up an ajax script with jQuery to have a user subscribe to a mailing list.
Is there a way I can send the subscriber's REMOTE_ADDR
in curl? Right now it's posting the IP_ADDRESS as the address of the server, but I need to capture the subscriber's ip.
I'm not trying to spoof anything, I just need to find a way to make sure I'm getting accurate information for email marketing compliance.
I tried adding the following to the curl post:
$ip = $_SERVER['REMOTE_ADDR'];
$ipaddress = array(
"REMOTE_ADDR: $ip",
"HTTP_X_FORWARDED_FOR: $ip"
);
curl_setopt( $ch, CURLOPT_HTTPHEADER, $ip_address);
but I'm still getting the server ip.