GithubHelp home page GithubHelp logo

valga / instagram-php-scraper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from postaddictme/instagram-php-scraper

1.0 0.0 0.0 413 KB

Instagram PHP Scraper. Get account information, photos, videos, stories and comments.

Home Page: https://packagist.org/packages/raiym/instagram-php-scraper

PHP 100.00%

instagram-php-scraper's Introduction

Instagram PHP Scrapper

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

instagram-php-scraper's People

Contributors

350d avatar adam-szabo avatar aik27 avatar alexpablo avatar denpli avatar diacomltd avatar drthief avatar elliott-beach avatar eversionsystems avatar ezobraz avatar geolim4 avatar germanow avatar gthedev avatar jasonadkison avatar karatemaccie avatar noy87ru avatar pawel-krzych avatar raiym avatar rezvani avatar rhcarlosweb avatar rifalpg avatar s3ri0usman avatar sebbekarlsson avatar shibby avatar shota avatar stereoflo avatar tomassrnka avatar wrinkleydog avatar ykharko avatar zipdriver avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.