fork download
  1. <?php
  2.  
  3. $curl = curl_init("https://i...content-available-to-author-only...m.br/api/seguranca/login");
  4.  
  5. CURLOPT_URL => "https://i...content-available-to-author-only...m.br/api/seguranca/login",
  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 => "POST",
  12. CURLOPT_POSTFIELDS => "{\n\t\"Key\": \"26A9763909FEA2B8E063A60119AC3E3F\"\n\t\n}",
  13. CURLOPT_HTTPHEADER => [
  14. "Content-Type: application/json"
  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 25708KB
stdin
Standard input is empty
stdout
cURL Error #:Could not resolve host: integracao.pagedu.com.br