fork download
  1. <?php
  2.  
  3. $curl = curl_init();
  4.  
  5. CURLOPT_URL => "https://y...content-available-to-author-only...i.com/subtitle?vid_id=0YPBVeHWPaw&lang_code=id&format=json3",
  6. CURLOPT_RETURNTRANSFER => true,
  7. CURLOPT_ENCODING => "",
  8. CURLOPT_MAXREDIRS => 10,
  9. CURLOPT_TIMEOUT => 30,
  10. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  11. CURLOPT_CUSTOMREQUEST => "GET",
  12. CURLOPT_HTTPHEADER => [
  13. "x-rapidapi-host: yt-api.p.rapidapi.com",
  14. "x-rapidapi-key: 4b2d56b413msh92389823c1ff76ep1d7c89jsnd6e44595b9d6"
  15. ],
  16. ]);
  17.  
  18. $response = curl_exec($curl);
  19. $err = curl_error($curl);
  20.  
  21. curl_close($curl);
  22.  
  23. if ($err) {
  24. echo "cURL Error #:" . $err;
  25. } else {
  26. echo $response;
  27. }
Success #stdin #stdout 0.04s 25696KB
stdin
Standard input is empty
stdout
cURL Error #:Could not resolve host: yt--api.p.rapidapi.com