Új hozzászólás Aktív témák

  • Forza_JUVE

    aktív tag

    válasz cucka #6909 üzenetére

    most a die hoz írtam be és ott működik az url

    ha egy az egybe átmásolom az else -be, akkor meg ez a rohadt "Could not open socket" jelenik meg ... pedig tuti h jól írom be a kódot. Mit nem tud megnyitni, mi az a socket ???

    a recaptchalib.php fájlban megtaláltam a szöveget ... de nem tudom értelmezni: :B

    function _recaptcha_http_post($host, $path, $data, $port = 80) {

    $req = _recaptcha_qsencode ($data);

    $http_request = "POST $path HTTP/1.0\r\n";
    $http_request .= "Host: $host\r\n";
    $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
    $http_request .= "Content-Length: " . strlen($req) . "\r\n";
    $http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
    $http_request .= "\r\n";
    $http_request .= $req;

    $response = '';
    if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
    die ('Could not open socket');
    }

    fwrite($fs, $http_request);

    while ( !feof($fs) )
    $response .= fgets($fs, 1160); // One TCP-IP packet
    fclose($fs);
    $response = explode("\r\n\r\n", $response, 2);

    return $response;
    }

Új hozzászólás Aktív témák