1. Go to this page and download the library: Download ner0tic/php-instagram-api 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/ */
ner0tic / php-instagram-api example snippets
$ig = new \Instagram\Client();
$photos = $ig->api('User')->recentMedia(); // recentMedia(array $options)
foreach($photos as $photo) {
echo $photo // $photo->caption.' '.$photo->getLink()
}
$ig = new \Instagram\Client();
$ig->setAuthClientId($id);
$ig->setAuthHttpPassword($pass);
$ig->setAuthUrlToken($token);
$ig->setAuthHttpToken($token);