Skip to content
Advertisement

Instagram Story Scraper PHP

i built a little Instagram Story Scraper but i cant get it to work…i’m probably just too tired. I’ve already tried everything but can’t solve the problem myself

Every time I run it with Wamp I get the same error

enter image description here

this is my index.php file

JavaScript

and this is instagramStory.php

JavaScript

Advertisement

Answer

I’m checking the same problem with you. Clearly it is because the command ‘foreach’ are accessing an empty array.

I deeply checked the data and found that $stories is empty because it cannot receive the current data from instagram website.

When I try to access the URL which is created by the program on my own browser with ins account logged, it works.

So the problem is because the code $cookies = dirname(__FILE__)."/cookie.txt" ; cannot find a current cookies. You should copy the cookies after logging into instagram website and put the cookie.txt file on the same folder with the .php file.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement