CameleonPDF

부분 유료
분류별 mare | 업데이트됨 месяц назад | Video, Images
Health Check

N/A

모든 토론으로 돌아가기

{"message":"Endpoint\/pdf2html\/ does not exist"}

Rapid account: Djrasmusp
djrasmusp
4 года назад

When using the api, I get this error ? what im i doing wrong ?

Rapid account: Djrasmusp
djrasmusp Commented 4 года назад

Heres my code

$filename = $_FILES['pdf']['tmp_name'];

        if(!is_readable($filename)){
            print('ERROR: file does not exist or is not readalbe');
                return;
        }
        $curl = curl_init();

        $cfile = curl_file_create($filename, 'application/pdf');

        curl_setopt_array($curl, array(
            CURLOPT_URL => "https://cameleonpdf.p.rapidapi.com/pdf2html/.",
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_FOLLOWLOCATION => true,
            CURLOPT_ENCODING => "",
            CURLOPT_MAXREDIRS => 10,
            CURLOPT_TIMEOUT => 30,
            CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
            CURLOPT_CUSTOMREQUEST => "POST",
            CURLOPT_POSTFIELDS => array('PDF' => $cfile),
            CURLOPT_HTTPHEADER => array(
                "content-type: application/pdf",
                "x-rapidapi-host: cameleonpdf.p.rapidapi.com",
                "x-rapidapi-key: MY_KEY_API"
            ),
        ));

        $response = curl_exec($curl);
        $err = curl_error($curl);

        curl_close($curl);

        if ($err) {
            echo "cURL Error #:" . $err;
        } else {
            echo $response;
        }
Rapid account: Feelmare
feelmare Commented 4 года назад

Hi, I tested it right now.
On my side, api is working…
How did you call the api?
Thank you.

BR
Leon

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입