Can not connect to server

  • kalf999

    324 Beiträge

    Niederlande

    This part of the code I use to Authenticate, but it results in an error everytime.

    $postData = array('apikey' => 'MyAPIKey' );
    $url = ' Link (http) ';
    $ch = curl_init();
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_POST, true);
    curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($postData) );
    curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    curl_exec($ch);

    if($errno = curl_errno($ch)) {
    $error_message = curl_strerror($errno);
    echo "cURL error ({$errno}):\n {$error_message}";
    }
    curl_close($ch);

    Resulting in "cURL error (7): Couldn't connect to server"
  • Konto gelöscht
    Administrator
    Konto gelöscht

    0 Beiträge

    Belgien

    Die Informationen sind nicht mehr verfügbar, da das Konto dieses Benutzers gelöscht wird (DSGVO-Grundverordnung).
  • kalf999

    324 Beiträge

    Niederlande

    Die Informationen sind nicht mehr verfügbar, da das Konto dieses Benutzers gelöscht wird (DSGVO-Grundverordnung).
    • Erstellt am 27.09.2018 um 03:15
    • #910255
    Hi Benjamin,

    I think it was between 17:00 and 18:30 indeed.....

    Ok, I will try to make some testruns today again.

    Thanks for your quickly support.

    Best regards, Francois
  • kalf999

    324 Beiträge

    Niederlande

    Still have same issues....

    curl_errno($ch) results "7"
    curl_strerror($ch) results "Couldn't connect to server"

    Or more specific ;
    curl_error($ch) results "Failed to connect to rest.delcampe.net port 80: Connection refused"

    I allready edited my drivers/etc/hosts , but it also not work


    <?php
    $postData = array('apikey' => 'MyApiKey' );
    $url = ' Link (http) ';
    $ch = curl_init();
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_POST, true);
    curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($postData) );
    curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    curl_exec($ch);

    if($errno = curl_errno($ch)) {
    $error_message = curl_strerror($errno);
    echo "cURL error ({$errno}):\n {$error_message}";
    }
    echo '<br>'. curl_errno($ch);
    echo '<br>'. curl_error($ch);
    echo '<br>'. curl_strerror(curl_errno($ch));

    curl_close($ch);
    ?>
  • Konto gelöscht
    Administrator
    Konto gelöscht

    0 Beiträge

    Belgien

    Die Informationen sind nicht mehr verfügbar, da das Konto dieses Benutzers gelöscht wird (DSGVO-Grundverordnung).
  • kalf999

    324 Beiträge

    Niederlande

    Answer from my hosting-provider :

    Verder moet het IP-adres van de doelserver worden vrijgegeven omdat uitgaande verbindingen via poort 80 worden geblokkeerd. Als je het IP-adres doorgeeft, kan ik dit op de whitelist zetten.

    Translated : The IP-adress needs to be unblocked for HTTP requests on port 80.

    If you can send me the IP-adress then my provider can put it on the whitelist on my server.

    Best regards, Frans Kalf (Kalf999)
  • Konto gelöscht
    Administrator
    Konto gelöscht

    0 Beiträge

    Belgien

    Die Informationen sind nicht mehr verfügbar, da das Konto dieses Benutzers gelöscht wird (DSGVO-Grundverordnung).
  • kalf999

    324 Beiträge

    Niederlande

    Die Informationen sind nicht mehr verfügbar, da das Konto dieses Benutzers gelöscht wird (DSGVO-Grundverordnung).
    • Erstellt am 02.10.2018 um 04:17
    • #912241
    Hi Benjamin !

    Great ! Thanks

Werden Sie Mitglied der Sammler-Community!

Anmelden Einloggen