1. Go to this page and download the library: Download lunoxis/instagram library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lunoxis / instagram example snippets
$ig = new Instagram\Login\Instagram('Username', 'Pass');
$cooki = $ig->login();
$session = new \Instagram\Login\Session();
print_r($session->SetSession($cooki->getCookieByName('rur')->getValue(),$cooki->getCookieByName('csrftoken')->getValue(),$cooki->getCookieByName('sessionid')->getValue(),$cooki->getCookieByName('ds_user_id')->getValue()));
$media = new \Instagram\Media\Post('https://www.instagram.com/p/CfJec1mMLie/?igshid=YmMyMTA2M2Y=');
print_r( $media->GetPost());
$info = new \Instagram\Media\Info('click.ir');
Get All Info
print_r($info->GetInfo());
Get Info
echo $info->GetInfo()[0]['username'];
$story = new \Instagram\Media\Story('https://instagram.com/stories/pcgadjettv/2868234876450457114?igshid=MDJmNzVkMjY=');
echo $story->GetLink();
$story = new \Instagram\Media\AllStory('click.ir');
print_r( $story->GetLink());
echo $story->MediaCount();
$high = new \Instagram\Media\HighLight('https://www.instagram.com/s/aGlnaGxpZ2h0OjE3OTI5NjQ4NzIzOTAyNjMy?story_media_id=2768449635828641458_7247131961&igshid=YmMyMTA2M2Y=');
echo $high->GetLink();
$all = new \Instagram\Media\AllHighLight();
$all->GetAllHighLight('click.ir');
print_r($all->GetHighLight());
Download HighLight BY HighLight ID
$all->GetHighLightmedia('highlight:17917690438338215');
print_r($all->HighLightLink());
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.