ufxdcollective / instagram-scraper
Scrap Instagram Public Profile
Package info
gitlab.com/ufxdcollective/instagramscraper
pkg:composer/ufxdcollective/instagram-scraper
0.2.0
2019-12-18 09:07 UTC
Requires
- php: 7.*
- ext-json: *
- guzzlehttp/guzzle: ^6.5
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-08-19 00:42:23 UTC
README
Usage
use UFXDCollective\InstagramScraper\Scraper;
$cache_dir = __DIR__ . '/cache';
$cache_timeout = 60 * 60 * 24; // 1 day in seconds
$scraper = new Scraper($cache_dir);
// Enable Cache.
$scraper->enableCache($cache_dir, $cache_timeout);
// Get the latest post.
$data = $scraper->latestPost();
// Structure of the $data variable will be:
$data = [
'image' => 'url/of/image/',
'cached_image' => 'cached_filename',
'caption' => 'Image Caption',
];