SHARE
TWEET

PHP Pastebin POST Code

Connorelsea Nov 16th, 2012 44 Never
  1. <?php
  2. $api_dev_key = "a0dd8b237db119d8388ff6550241c6d5";
  3. $api_paste_code = "Elsea :: Error(null)";
  4. $api_option = "paste";
  5. $api_paste_name = "Elsea :: Error(null)";
  6.  
  7. $to_url = "http://pastebin.com/api/api_post.php";
  8.  
  9. $url = 'http://pastebin.com/api/api_post.php';
  10. $ch = curl_init($url);
  11.  
  12. curl_setopt($ch, CURLOPT_POST, true);
  13. curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_option=paste&api_paste_name='.$api_paste_name.'&api_dev_key='.$api_dev_key.'&api_paste_code='.$api_paste_code.'');
  14. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  15. curl_setopt($ch, CURLOPT_VERBOSE, 1);
  16. curl_setopt($ch, CURLOPT_NOBODY, 0);
  17.  
  18. $response = curl_exec($ch);
  19. echo $response;
  20. ?>
RAW Paste Data
Top