According to Instagram you can check API limit count remaining using the HTTP headers that they supply with the call. I am quite new to this and am unable to find relevant data on how to access this information with PHP. Could anyone please clarify this for me?
I found the following from the Instagram API developers forum on Google Groups:
“We just rolled this out to production; all API calls now have the
additional HTTP headers:
X-Ratelimit-Limit(total # of possible calls per hour)X-Ratelimit-Remaining(how many calls are left for this particular token or client ID)”
If you’re using
file_get_contentsto make the request (or anything that uses the HTTP wrapper for that matter), the special variable$http_response_headercontains an array of lines with the HTTP response headers of the most recent request.Maybe something like this: