title: How to paste data to pastebin using the api in php?
body: <pre><code>&lt;?php 
  
  /* gets the data from a URL */ 
  function get_data($url) 
  
  { 
  
    $ch = curl_init();
  
    $timeout = 5;
  
    curl_setopt($ch,CURLOPT_URL,$url);
  
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  
    curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
  
    $data = curl_exec($ch);
  
    curl_close($ch);
    return $data;
  
  }
  $paste_data=""; if(isset($_POST["paste_code"])) { $paste_data = $_POST["paste_code"]; }
  echo $paste_data;
  $returned_content = get_data('http://pastebin.com/api_public.php/paste_code(paste_data)');
  echo $returned_content;
  ?&gt;
  </code></pre>
  
  <p>This is my php code . where $paste_data contains the data to be pasted in a new page . How do I paste it using the function paste_code(String) ? </p>