title: Send HTTP Post Request PHP
body: <p>I try use the Steam API for cancel a trade offer. Following this: <a href="https://developer.valvesoftware.com/wiki/Steam_Web_API/IEconService#CancelTradeOffer_.28v1.29" rel="nofollow">https://developer.valvesoftware.com/wiki/Steam_Web_API/IEconService#CancelTradeOffer_.28v1.29</a></p>
  
  <p>I need pass the tradeofferid with an HTTP Post request. I make this but the tradeoffer don't cancel:</p>
  
  <pre><code>    function RechazarOferta($tradeid)
  {
      $data = array('tradeofferid' =&gt; $tradeid);
      $trade = array('tradeofferid' =&gt; $tradeid, 'language' =&gt; 'english');
  
      $url = 'https://api.steampowered.com/IEconService/CancelTradeOffer/v1/?key=C9786993763535D16XXXXXXXXX&amp;'.http_build_query($trade);
  
      $c = curl_init();
      curl_setopt($c, CURLOPT_URL, $url);
      curl_setopt($c, CURLOPT_POST, 1);
      curl_setopt($c, CURLOPT_POSTFIELDS, $data);
      $return = curl_exec($c);
      curl_close($c);
  
      var_dump($return);
  }
  </code></pre>
  
  <p>Any solution or better form to make an HTTP Post request?</p>