Advertisement
Guest User

Untitled

a guest
Apr 4th, 2020
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. $url = 'https://neowebinar.cz/oauth/token';
  2. $webinar_client_id = "1";    
  3. $webinar_client_secret = "9EyOZBQT1C03JWV8eVlmstioTDM9BhzXHZ0Vehe7";    
  4.  
  5. $ch = curl_init();
  6. curl_setopt($ch, CURLOPT_URL, $url);
  7. curl_setopt($ch, CURLOPT_POST, 1);
  8.  
  9. curl_setopt($ch, CURLOPT_POSTFIELDS,"client_id=".$webinar_client_id."&client_secret=".$webinar_client_secret."&grant_type=client_credentials&scope=*");
  10. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  11. $output = curl_exec($ch);  
  12. $output = json_decode($output);
  13.  
  14. echo curl_getinfo($ch, CURLINFO_HTTP_CODE);
  15. var_dump($output);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement