skalero01/the-imgur-uploader

This package is abandoned and no longer maintained. No replacement package was suggested.

Upload an image with or witout imgur account. ¡It works too in Picasa and Imageshack!

dev-master 2014-12-04 23:08 UTC

This package is not auto-updated.

Last update: 2017-12-15 12:12:40 UTC


README

This project help to remote upload images to Imgur and some other hosting services like Picasa, Imageshack, Postimage, etc.

This project is a fiixed version of PHP-Image-Uploader by Phan Thanh Cong .

What was fixed?

  • It was needed to download another package.
  • It had problems with the installation

Usage

If you use composer

Add require "skalero01/the-imgur-uploader": "dev-master" to composer.json and run composer update,

Upload to Imgur

$uploader = ChipVN_ImageUploader_Manager::make('Imgur');
$uploader->setApi('your client id');
$uploader->setSecret('your client secret');
// you may upload with anonymous account but may be the image will be deleted after a period of time
// $uploader->login('your account here', 'your password here');
echo $uploader->upload(getcwd(). '/a.jpg');
echo $uploader->transload('http://img33.imageshack.us/img33/6840/wz7u.jpg');

Upload to Picasa.

To upload image to Picasa, you need to have some AlbumIds otherwise the image will be uploaded to default album. To create new AlbumId faster, you may use echo $uploader->addAlbum('testing 1');

$uploader = ChipVN_ImageUploader_Manager::make('Picasa');
$uploader->login('your account', 'your password');
// you can set upload to an albumId by array of albums or an album, system will get a random album to upload
//$uploader->setAlbumId(array('51652569125195125', '515124156195725'));
//$uploader->setAlbumId('51652569125195125');
echo $uploader->upload(getcwd(). '/test.jpg');
// this plugin does not support transload image

Upload to Imageshack

$uploader = ChipVN_ImageUploader_Manager::make('Imageshack');
$uploader->login('your account', 'your password');
$uploader->setApi('your api here');
echo $uploader->upload(getcwd(). '/a.jpg');
echo $uploader->transload('http://img33.imageshack.us/img33/6840/wz7u.jpg');

Upload to Postimage

$uploader = ChipVN_ImageUploader_Manager::make('Postimage');
// you may upload with anonymous account but may be the image will be deleted after a period of time
// $uploader->login('your account here', 'your password here');
echo $uploader->upload(getcwd(). '/a.jpg');
echo $uploader->transload('http://img33.imageshack.us/img33/6840/wz7u.jpg');

Upload to FLickr

// already exist, update later