cURL : "Couldn' T connect to host"

Habe ich dadurch gelöst, dass in der Vergangenheit, aber ich habe definitiv nicht daran erinnern, wie.

So, ich bin versucht zu Holen eine Webseite auf meinen server, einen proxy zu nutzen.

Hier ist der code :

function curlFile($url,$proxy_ip,$proxy_port,$loginpassw)
{

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_PROXYPORT, $proxy_port);
    curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP');
    curl_setopt($ch, CURLOPT_PROXY, $proxy_ip);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_VERBOSE, false);
    curl_setopt($ch, CURLOPT_PROXYUSERPWD, $loginpassw);
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 0);


    $data = curl_exec($ch);

    if(curl_errno($ch)){
             echo 'Curl error: ' . curl_error($ch);
    }

    print_r(curl_getinfo($ch));
    print_r(curl_error($ch));

    print_r($data);

    curl_close($ch);

    return $data;
}

Alle derzeit Ausgänge :

Curl-Fehler: couldn ' T connect to hostArray ( [url] =>
http://www.drkameleon.com [content_type] => [http_code] => 0
[header_size] => 0 [request_size] => 0 [filetime] => -1
[ssl_verify_result] => 0 [redirect_count] => 0 [total_time] =>
0.007872 [namelookup_time] => 0.007537 [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 ) konnte keine Verbindung zu host

So, irgendwelche Ideen? Was könnte schief gehen?

InformationsquelleAutor Dr.Kameleon | 2013-07-31

Schreibe einen Kommentar