i want to use CURL with addon ip which is added on my server So i am using below script for simple CURL pass.
<?php
function get_html($url,$ip) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_INTERFACE, $ip);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_FAILONERROR, 0);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$ip="173.214.xxx.198";
$l = get_html("http://www.checkip.com/",$ip);
echo $l;
?>
This script running fine on other server . Please give me solution of this problem