Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

24 changes: 19 additions & 5 deletions README.markdown → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,31 @@ A basic CURL wrapper for PHP (see [http://php.net/curl](http://php.net/curl) for

## Installation

Click the `download` link above or `git clone git://github.com/shuber/curl.git`

### Installing with the composer:

Add composer.json package in your project file or create a new file.
```json
{
"require":{
"shuber/curl": "dev-master"
}
}
```
Get the composer and install, or run the updater.
```bash
curl -sS https://getcomposer.org/installer | php
php composer.phar install
```

## Usage

### Initialization

Simply require and initialize the `Curl` class like so:
Simply require the `Autoload` and initialize the object:

require_once 'curl.php';
$curl = new Curl;
require_once 'vendor/autoload.php';
use Shuber\LibCurl as Curl;
$curl = new Curl\Curl();


### Performing a Request
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"type": "library",
"description": "PHP Wrapper for Curl",
"autoload": {
"files": ["curl.php"]
"psr-0" : {
"":"lib/"
}
}
}
5 changes: 0 additions & 5 deletions curl.php

This file was deleted.

2 changes: 1 addition & 1 deletion lib/curl.php → lib/Shuber/LibCurl/Curl.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

namespace Shuber\LibCurl;
/**
* A basic CURL wrapper
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

namespace Shuber\LibCurl;
use Exception;
class CurlException extends Exception
{

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

namespace Shuber\LibCurl;
/**
* Parses the response from a Curl request into an object containing
* the response body and an associative array of headers
Expand Down