randsx / instagram-downloader
PHP package download the image or video on Instagram
v1.0
2020-12-02 14:32 UTC
Requires
- php: >=7.1
- guzzlehttp/guzzle: ^7.0
README
A package for download the image or video in Instagram.
Installation
Install using composer
composer require randsx/instagram-downloader
Usage
use RandsX\InstagramDownloader\InstagramDownloader; $instagram = new InstagramDownloader;
First set the url that you want to download the image / video as follows.
- Method 1
$instagram = new InstagramDownloader("https://instagram.com/link");
- Method 2
$instagram = new InstagramDownloader; $instagram->setURL("https://instagram.com/link");
If you want to know the image / video type of the url you have defined, do it like this
$instagram->getType(); // Returned "image" or "video"
Then if you want to get the download link, do it like this
$instagram->getDownloadLink();