fork download
  1. <?php
  2. $curl = curl_init();
  3.  
  4. CURLOPT_URL => 'https://a...content-available-to-author-only...l.com/v1/oauth2/token',
  5. CURLOPT_RETURNTRANSFER => true,
  6. CURLOPT_ENCODING => '',
  7. CURLOPT_MAXREDIRS => 10,
  8. CURLOPT_TIMEOUT => 0,
  9. CURLOPT_FOLLOWLOCATION => true,
  10. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  11. CURLOPT_CUSTOMREQUEST => 'POST',
  12. CURLOPT_POSTFIELDS => 'grant_type=client_credentials',
  13. CURLOPT_HTTPHEADER => array(
  14. 'Content-Type: application/x-www-form-urlencoded',
  15. 'Authorization: Basic '.base64_encode('AehyGVkJLNPAE8haawDvVT5cwmi-xWRFhWldhYHZGgSyB_OpjNpYw_9WvIbM076TPOSbxBFn9zobjqrm:EPoVZ-QuR_ZEOsnZNdKj9Vkm8HCqdhqYy7cTeAZX3XymECAp5a_MXZZUUAKKOHeI1G89QTpTxJSJKvB-')
  16. ),
  17. ));
  18.  
  19. $response = curl_exec($curl);
  20.  
  21. curl_close($curl);
  22. echo $response;
  23. ?>
  24.  
Success #stdin #stdout 0.04s 26204KB
stdin
Standard input is empty
stdout
Standard output is empty