An open API service indexing awesome lists of open source software.

https://github.com/null-none/imguruploadphp

Class for use imgur API.
https://github.com/null-none/imguruploadphp

Last synced: about 1 year ago
JSON representation

Class for use imgur API.

Awesome Lists containing this project

README

          

# ImgurUploadPHP

PHP class for quickly uploading images to Imgur.

``` php
$imgur = new ImgurUploader;
$imgur->setClientId('clientID');
$result = $imgur->uploadImage('browserling.png');
if (!$result) {
$error = $imgur->getError();
print "Upload failed. Error: $error";
}
else if ($result['status'] != 200) {
print "Upload failed. Error: " . $result['data']['error'];
print_r($result);
}
else {
print "Upload successful!";
print_r($result);
}
```