Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 'instagram':
- $td_data = td_remote_http::get_page("http://instagram.com/$user_id#", __CLASS__);
- //$pattern = "/followed_by\":(.*?),\"follows\":/";
- //$pattern = "/followed_by\"\:\{\"count\"\:(.*?)\}\,\"/";
- // get the serialized data string present in the page script
- $pattern = '/window\._sharedData = (.*);<\/script>/';
- preg_match($pattern, $td_data, $matches);
- if (!empty($matches[1])) {
- $instagram_json = json_decode($matches[1], true);
- if (!empty($instagram_json['entry_data']['ProfilePage'][0]["graphql"]['user']["edge_followed_by"]['count'])) {
- $buffy_array = (int) $instagram_json['entry_data']['ProfilePage'][0]["graphql"]['user']["edge_followed_by"]['count'];
- }
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment