fork download
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <?php
  6. // The URL you want to fetch data from
  7. $url = "https://w...content-available-to-author-only...e.com/oembed?url=https://w...content-available-to-author-only...e.com/watch?v=jh2LJVDtGIY&format=json";
  8.  
  9. // Initialize cURL session
  10. $ch = curl_init();
  11.  
  12. // Set cURL options
  13. curl_setopt($ch, CURLOPT_URL, $url); // Set the URL
  14. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return the response as a string
  15. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); // Follow any redirects
  16.  
  17. // Execute cURL and get the response
  18. $response = curl_exec($ch);
  19.  
  20. // Check for errors
  21. if(curl_errno($ch)) {
  22. echo 'cURL error: ' . curl_error($ch);
  23. } else {
  24. // Print the response
  25. echo $response;
  26. }
  27.  
  28. // Close the cURL session
  29. ?>
  30.  
  31.  
  32. </body>
  33. </html>
  34.  
Success #stdin #stdout 0.03s 26068KB
stdin
Standard input is empty
stdout
<!DOCTYPE html>
<html>
<body>

cURL error: Could not resolve host: www.youtube.com

</body>
</html>