A curl library for Yii
Switch branches/tags
Nothing to show
Pull request Compare This branch is 7 commits behind phpnode:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
ACurl.php
ACurlException.php
ACurlOptions.php
ACurlResponse.php
README.md
package.json

README.md

Introduction

A curl wrapper for Yii, allows easier access to curl functions.

Example usage

To grab a url:

$curl = new ACurl();
$data = $curl->get("http://www.google.com/")->data;
echo $data;

To retrieve just the headers for a URL:

$curl = new ACurl();
$headers = $curl->head("http://www.google.com/")->headers;
print_r($headers);

To post data to a URL:

$curl = new ACurl();
$response = $curl->post("http://example.com/",array("key" => "value"))->data;
echo $response;

To load JSON from a URL:

$curl = new ACurl();
$response = $curl->get("http://www.example.com/test.json")->fromJSON();
print_r($response);