I have a shared hosting with a dedicated ip, when I send a request with curl (php), the receiver sees the server IP, instead of the ip the domain resolves to (the dedicated one).
$ch = curl_init("https://www.showmyip.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
print curl_exec($ch);
curl_close($ch);
My hosting provider says I need to send from the domain to use the dedicated IP, for me it's not possible as the request is necessarily sent by the server. Am I wrong ?
EDIT: My problem is that the shared IP (the server one) is blacklisted by mailjet because of other users, and my request are blocked because my curl requests use the banned IP. It's why I bought a dedicated IP for the domain but it is not used by php. So I need the curl option (if exists) that will "force" curl to use the dedicated IP.