i am using curl code to save data on server, my code works fine in my localhost,
but when i call same url from server i get below error : blocked because you appear to be accessing this website from a hosting provider network, proxy server, or VPN server.
$ch = curl_init();
// needed to disable SSL checks for this site
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch,CURLOPT_VERBOSE, 0);
curl_setopt($ch,CURLOPT_AUTOREFERER, true);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
$url = 'https://www.zaubacorp.com/companybrowse/A/'.$appendit;
curl_setopt($ch,CURLOPT_URL, $url);
$data = curl_exec($ch);
echo $data;
can u please help me fix this issue
Many companies dislike non-browsers accessing their websites and often block them. You might want to alter the agent id string from "CURL" to a random one like :-
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.102011-10-16
Also insert a few random pauses so you don't overload their server.