jamset / instagram-php-scraper
Instagram PHP Scraper. Get account information, photos and videos without any authorization
v0.8.8
2017-12-14 01:30 UTC
Requires
- php: >=5.4.0
- mashape/unirest-php: 3.0.*
- phpfastcache/phpfastcache: 5.0.*
Requires (Dev)
- phpunit/phpunit: 5.5.*
- v0.8.8
- v0.8.7
- v0.8.6
- v0.8.5
- v0.8.4
- v0.8.3
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.1
- v0.6.0
- v0.5.9
- v0.5.8
- v0.5.7
- v0.5.6
- v0.5.5
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.8
- v0.4.7
- v0.4.6
- v0.4.5
- v0.4.4
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.5
- v0.3.4
- 0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
This package is auto-updated.
Last update: 2024-12-12 08:34:00 UTC
README
This library based on Instagram web version. We develop it because nowadays it is hard to get approved Instagram application. The purpose support every feature that web desktop and mobile version support.
Code Example
$instagram = Instagram::withCredentials('username', 'password'); $instagram->login(); $account = $instagram->getAccountById(3); echo $account->getUsername();
Some methods does not require auth:
$instagram = new Instagram(); $nonPrivateAccountMedias = $instagram->getMedias('kevin'); echo $nonPrivateAccountMedias[0]->getLink();
If you use auth it is recommended to cash user session, in this case you don't need run $instagram->login()
method every time your program runs:
$instagram = Instagram::withCredentials('username', 'password', '/path/to/cache/folder/'); $instagram->login(); // will use cached session if you can force login $instagram->login(true) $account = $instagram->getAccountById(3); echo $account->getUsername();
Using proxy for requests:
$instagram = new Instagram(); Instagram::setProxy([ 'address' => '111.112.113.114', 'port' => '8080', 'tunnel' => true, 'timeout' => 30, ]); // Request with proxy $account = $instagram->getAccount('kevin'); Instagram::disableProxy(); // Request without proxy $account = $instagram->getAccount('kevin');
Installation
Using composer
composer.phar require raiym/instagram-php-scraper
or
composer require raiym/instagram-php-scraper
If you don't have composer
You can download it here.
Examples
See examples here.
Other
Java library: https://github.com/postaddictme/instagram-java-scraper