$options = array(
CURLOPT_RETURNTRANSFER => true, // to return web page
CURLOPT_HEADER => false, // to return headers in addition to content
CURLOPT_FOLLOWLOCATION => true, // to follow redirects
CURLOPT_ENCODING => "", // to handle all encodings
CURLOPT_AUTOREFERER => true, // to set referer on redirect
CURLOPT_CONNECTTIMEOUT => 5, // set a timeout on connect
CURLOPT_TIMEOUT => 5, // set a timeout on response
CURLOPT_MAXREDIRS => 5, // to stop after 10 redirects
CURLINFO_HEADER_OUT => true, // no header out
CURLOPT_SSL_VERIFYPEER => false,// to disable SSL Cert checks
CURLOPT_FORBID_REUSE => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
COOKIESESSION => true,
);
$handle = curl_init( $url );
curl_setopt_array( $handle, $options );
curl_setopt($handle, CURLOPT_PROXY, '69.7.113.4');
$raw_content = curl_exec( $handle );
curl_close( $handle );
As soon as i use curl_setopt($handle, CURLOPT_PROXY, '69.7.113.4'); i cant get it working, is there a windows setting i need to change?
if i just comment the line curl_setopt($handle, CURLOPT_PROXY, '69.7.113.4'); i get a response.
Response
Array ( [url] => [content_type] => [http_code] => 0 [header_size] => 0 [request_size] => 0 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 5.008 [namelookup_time] => 0 [connect_time] => 0 [pretransfer_time] => 0 [size_upload] => 0 [size_download] => 0 [speed_download] => 0 [speed_upload] => 0 [download_content_length] => -1 [upload_content_length] => -1 [starttransfer_time] => 0 [redirect_time] => 0 [redirect_url] => [primary_ip] => [certinfo] => Array ( ) [primary_port] => 0 [local_ip] => [local_port] => 0 [errno] => 28 [errmsg] => Connection timed out after 5008 milliseconds [headers] => [content] => )