All I want is to execute a cURL request with user's IP address.
Suppose if a user's browser is Mozilla Firefox blah blah blah..... That's fine
but how can the user's IP address be sent with cURL request? Many websites blocked the server IP address to access through cURL.
The code sample below:
$ch = curl_init($ip);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
echo $data;
please help me in this code