Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. $api_dev_key = 'YOUR API DEVELOPER KEY';
  2. $api_user_name = 'a_users_username';
  3. $api_user_password = 'a_users_password';
  4. $api_user_name = urlencode($api_user_name);
  5. $api_user_password = urlencode($api_user_password);
  6. $url = 'https://pastebin.com/api/api_login.php';
  7. $ch = curl_init($url);
  8.  
  9. curl_setopt($ch, CURLOPT_POST, true);
  10. curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_dev_key='.$api_dev_key.'&api_user_name='.$api_user_name.'&api_user_password='.$api_user_password.'');
  11. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  12. curl_setopt($ch, CURLOPT_VERBOSE, 1);
  13. curl_setopt($ch, CURLOPT_NOBODY, 0);
  14.  
  15. $response = curl_exec($ch);
  16. echo $response;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement