Saturday, April 11, 2015

[PHP] Simple Remote Imageshack Upload

11 April 2015

Intro::

Simple Remote Imageshack Upload menggunakan remote image uploader by ptcong

Steps::

Download Script Remote Image Uploader
1. https://github.com/ptcong/php-remote-image-uploader
2. install & extract localhost/twitplay/lib/remoteupload/

Buat Applikasi Imageshack mendapatkan api key
1. https://imageshack.com/contact/api
2. isi form kemudian catat api_key

Simple Upload Imageshack
1. copas script dibawah ini dan jangan lupa mengganti username, password, api_key

<?php
include 'lib/remoteupload/autoload.php';
include 'lib/remoteupload/ChipVN/ClassLoader/Loader.php';
ChipVN_ClassLoader_Loader::registerAutoLoad();

$uploader = ChipVN_ImageUploader_Manager::make('Imageshack');
$uploader->login('username', 'password');
$uploader->setApi('api_key');

//dir upload
echo $uploader->upload(getcwd(). '/img/yupi.jpg');

//link upload
//echo $uploader->transload('http://img33.imageshack.us/img33/6840/wz7u.jpg');


?>

2. simpan testupload.php dan panggil di browser

Catatan::

Jangan lupa menginstall class loader dalam /twitplay/lib/remoteupload/
>https://github.com/ptcong/php-chipvn-classloader
>https://github.com/ptcong/php-http-client
>https://github.com/ptcong/php-cache-manager

1 comment:

  1. Spin Casino provides players a world of on-line and cellular entertainment, with plenty of casino gamesto take pleasure in on various platforms. From slots, table video games, such as blackjack and roulette, video poker and reside casino video games, Spin Casino has all of it. Add to this a sports activities betting section with e-sports and In-Play 점보카지노 betting, and you've got} all your entertainment wants in one place. There are common promotions, plenty of deposit and withdrawal options, and 24/7 support, all in a secure and secure setting. Players can take pleasure in all of this through Spin Casino’s on-line or cellular casino, or simply download the casino app for thrilling video games on the go. Most casinos enable you to position bets to participate within the video games that they provide.

    ReplyDelete