не получая ошибок с curl, а также не получить никакого ответа - PullRequest
1 голос
/ 26 февраля 2020

я пытаюсь войти в netflix, используя php curl, но я не получаю ответа или ошибок. Вот мой код

$handle = curl_init();


    $url = "https://www.netflix.com/ke-en/login";

// Array with the fields names and values.
// The field names should match the field names in the form.

    $postData = array(
        'userLoginId' => 'Lady',
        'password' => 'Gaga',
        'submit' => 'ok'
    );

    curl_setopt_array($handle,
        array(
            CURLOPT_URL => $url,
            // Enable the post response.
            CURLOPT_POST => true,
            // The data to transfer with the response.
            CURLOPT_POSTFIELDS => $postData,
            CURLOPT_RETURNTRANSFER => true,
        )
    );

    $data = curl_exec($handle);
    echo curl_error($handle);
    echo curl_errno($handle);
    curl_close($handle);

    echo $data;

ошибка, которую я получаю, равна 0, и я понял, что это означает успешно

...