Skip to content

Commit

Permalink
Update readme, and swap files to gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
amouhzi committed Nov 3, 2013
1 parent 8e3569d commit 1639ca0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ vendor/*
.buildpath
.project
.settings/*
composer.lock
composer.lock
*~
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,28 @@ PHP Curl Class is an object-oriented wrapper of the PHP cURL extension.
### Quick Start and Examples

```php
require 'Curl.class.php';

$curl = new Curl();
$curl = new Curl\Curl();
$curl->get('http://www.example.com/');
```

```php
$curl = new Curl();
$curl = new Curl\Curl();
$curl->get('http://www.example.com/search', array(
'q' => 'keyword',
));
```

```php
$curl = new Curl();
$curl = new Curl\Curl();
$curl->post('http://www.example.com/login/', array(
'username' => 'myusername',
'password' => 'mypassword',
));
```

```php
$curl = new Curl();
$curl = new Curl\Curl();
$curl->setBasicAuthentication('username', 'password');
$curl->setUserAgent('');
$curl->setReferrer('');
Expand All @@ -47,29 +46,29 @@ var_dump($curl->response_headers);
```

```php
$curl = new Curl();
$curl = new Curl\Curl();
$curl->setopt(CURLOPT_RETURNTRANSFER, TRUE);
$curl->setopt(CURLOPT_SSL_VERIFYPEER, FALSE);
$curl->get('https://encrypted.example.com/');
```

```php
$curl = new Curl();
$curl = new Curl\Curl();
$curl->put('http://api.example.com/user/', array(
'first_name' => 'Zach',
'last_name' => 'Borboa',
));
```

```php
$curl = new Curl();
$curl = new Curl\Curl();
$curl->patch('http://api.example.com/profile/', array(
'image' => '@path/to/file.jpg',
));
```

```php
$curl = new Curl();
$curl = new Curl\Curl();
$curl->delete('http://api.example.com/user/', array(
'id' => '1234',
));
Expand Down

0 comments on commit 1639ca0

Please sign in to comment.