I am using multi curl to fetch data from remote site. My script is like
foreach ($urls as $i => $url) {
$ch[$i] = curl_init($url['url']);
curl_setopt($ch[$i], CURLOPT_TIMEOUT, 0);
curl_setopt($ch[$i], CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch[$i], CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch[$i], CURLOPT_SSL_VERIFYPEER, false);
curl_multi_add_handle($multiCurlHandler, $ch[$i]);
}
It returns me 403 forbidden in response.
Thanks in advance for suggestions and comments.
Just try by adding two lines for User agents, and see if it works or not.
Some servers not accept the requests from scripts, it depends on user agents.