This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!

PHP Pastebin POST Code

By: Connorelsea on Nov 16th, 2012  |  syntax: PHP  |  size: 0.65 KB  |  views: 44  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. ?>
clone this paste RAW Paste Data