Instaget is a simple PHP library to get Instagram photos per user and to store them on the local server for later usage. Instaget is still in beta, more features will be implemented in the upcoming versions.
Instaget is available via Composer:
$ composer require hashem/instaget
use Hashem\Instaget\Instaget as Instaget;
use League\Flysystem\Filesystem;
use League\Flysystem\AdapterInterface;
use League\Flysystem\Adapter\Local as Adapter;
# Our (private) Filesystem
$fs = new Filesystem(new Adapter(__DIR__.'/'), [
'visibility' => AdapterInterface::VISIBILITY_PRIVATE
]);
$inst = new Instaget($fs, [
'clientID' => 'YOUR_CLIENT_ID',
'username' => 'USERNAME',
# Optional parameters:
'count' => 6, // user feed limit
'imageType' => 'large', // size of the instagram shots
'expTime' => 3600, // image caching exp. time
'imagePath' => 'images/', // path to the image directory, with trailing forward-slash
'dataPath' => 'data/' // path to the user's info directory, with trailing forward-slash
]);
# Get/Store the shots!
$shots = $inst->run();
Instaget requires PHP 5.4+ and League\Flysystem filesystem.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email hashem at qolami dot com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.