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.
- Host: GitHub
- URL: https://github.com/null-none/imguruploadphp
- Owner: null-none
- License: mit
- Created: 2015-07-18T21:50:12.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-20T03:16:47.000Z (almost 11 years ago)
- Last Synced: 2025-01-26T09:28:35.987Z (about 1 year ago)
- Language: PHP
- Size: 167 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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);
}
```