json - How to get certain data from a page to be recorded into a file using php? -


i using facebook graph api reach of post in webpage

and returns page content:

    {    "data": [       {          "id":"129788793265_10154069879148266/insights/post_impressions_unique/lifetime",          "name": "post_impressions_unique",          "period": "lifetime",          "values": [             {                "value": 1627             }          ],          "title": "lifetime post total reach",          "description": "lifetime: total number of people page post served to. (unique users)"       }    ],    "paging": {       "previous": "https://graph.facebook.com/<postid>/insights/post_impressions_unique/lifetime?access_token=xxxx",       "next": "https://graph.facebook.com/<postid>/insights/post_impressions_unique/lifetime?access_token=xxxx"    } } 

i want extract "value" 1627 page file every 10 mins.

how do that?

the response api json. in php need json_decode() extract required data.

for running script every 10 minutes, can setup cron or try poor mans cron. here simple example.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -