How to use drupal_http_request()

Public

Get raw version
php
  1. <?php
  2. $data = 'name=value&name1=value1'; // Parameters to pass to URL
  3. $options = array(
  4. 'method' => 'POST', // HTTP Request Type
  5. 'data' => $data, // Parameters
  6. 'headers' => array('Content-Type' => 'application/x-www-form-urlencoded'),
  7. );
  8. $result = drupal_http_request('http://example.com', $options);
  9. ?>