title: How to secure sending Post data through cURL?
body: <p>I'm using Client URL to send POST data. Link to the source: <a href="http://hayageek.com/php-curl-post-get/#curl-post" rel="nofollow">http://hayageek.com/php-curl-post-get/#curl-post</a>. The code is as following: </p>
  
  <pre><code>&lt;?php
  function httpPost($url,$params){
    $postData = '';
     //create name value pairs seperated by &amp;
     foreach($params as $k =&gt; $v){
        $postData .= $k . '='.$v.'&amp;';
     }
  rtrim($postData, '&amp;');
  $ch = curl_init(); 
  
  curl_setopt($ch,CURLOPT_URL,$url);
  curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
  curl_setopt($ch,CURLOPT_HEADER, false);
  curl_setopt($ch, CURLOPT_POST, count($postData));
  curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);   
  
  $output=curl_exec($ch);
  
  curl_close($ch);
  return $output;
  
  }
  
  $params = array(
     "name" =&gt; "Ravishanker Kusuma",
     "age" =&gt; "32",
     "location" =&gt; "India"
  );
  
  echo httpPost("http://www.jmediatechnology.eu/script.php",$params);
  ?&gt;
  </code></pre>
  
  <p>I want to know wether this method is safe from hijacking or any other security issues.</p>