Skip to content

Instantly share code, notes, and snippets.

@thugsb
thugsb / instagram.php
Last active May 13, 2017 18:00
A PHP script to grab recent images from Instagram from a specified user.
<?php
// Edit these five variables, and look below for $output if you wish to edit the HTML output
$access_token = 'YOUR ACCESS KEY'; // You can get an access token here: https://elfsight.com/service/get-instagram-access-token/
$folder_path = '/WEB_ROOT/instagram/'; // Path on your server, ending with /
$web_folder_path = '/instagram/'; // Path to link the images to, ending with /
$email = 'YOUR EMAIL'; // Used to send alerts to let you know the cron has succeeded or not.
$image_count = 4; // Number of images you want.