fork download
  1. <?php
  2.  
  3. $curl = curl_init();
  4.  
  5. CURLOPT_URL => "https://f...content-available-to-author-only...i.com/search/posts?query=facebook",
  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: facebook-scraper3.p.rapidapi.com",
  14. "x-rapidapi-key: ea8f5efe3emshda10fbd42d354dep1f18a9jsn1f8d4bd0e9a5"
  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 26256KB
stdin
Standard input is empty
stdout
cURL Error #:Could not resolve host: facebook-scraper3.p.rapidapi.com