Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A minimalist HTTP client for PHP

tree: faa3d7c499

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.textile

A minimalist HTTP client for PHP.

GET

  
$options = array (
  'debug_log' => '/tmp/http.log',
  'follow_redirects' => false,
  'connect_timeout' => 30000,
  'cookie_jar' => '/app/tmp/cookies.txt',
  'proxy' => 'http-proxy:8080'
)
$headers = array('User-Agent' => 'Googlebot/2.1 ( http://www.googlebot.com/bot.html)');
$response = HTTP::get('http://google.com', $headers, $options);
  

POST

  
$parameters = array(
  'name' => 'Data',
  'file' => "@$file"#(file_get_contents('/tmp/data.txt')) # File upload
);
$response = HTTP::post('http://my-files/upload', $parameters)
  

Something went wrong with that request. Please try again.