Based on Kenneth Reitz API for requests
Unstable - In Development
<?php
// Require a PSR-0 compliant autoloader
require './vendor/autoload.php';
// Require the Requests API
require 'lib/Requests/Api.php';
$response = Requests\Get("https://www.google.com/robots.txt");
if ($response->isOk()) {
echo $response->body;
}
<?php
// Require a PSR-0 compliant autoloader
require './vendor/autoload.php';
// Require the Requests API
require 'lib/Requests/Api.php';
$response = Requests\Post("https://www.gmail.com/", ["data"=>["foo"=>"bar"]]);
if ($response->isOk()) {
echo "The response content-type is " . $response->headers["content-type"];
}