I'm looking for some helping with using a php instagram feed.
I found this link through my research and it works perfectly but I don't know how to limit the results from instagram's default of 20.
I'd really just like to show 6 images at a time.
I'm not great with php so please forgive my ignorance.
Please see the code below
<?phpfunction fetchData($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 20); $result = curl_exec($ch); curl_close($ch); return $result;}$result = fetchData("https://api.instagram.com/v1/users/ID-GOES-HERE/media/recent/?access_token=TOKEN-GOES-HERE");$result = json_decode($result);foreach ($result->data as $post) { // Do something with this data.}?>