Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $response = file_get_contents("https://www.instagram.com/p/BeIWLJ9h97j/?__a=1");
- if ($response !== false) {
- $data = json_decode($response, true);
- if ($data !== null) {
- //print_r($data);
- //print_r($data['graphql']['shortcode_media']['taken_at_timestamp']);
- $unixTime=$data['graphql']['shortcode_media']['taken_at_timestamp'];
- $dt = new DateTime("@$unixTime");
- $dt->setTimeZone(new DateTimeZone('America/Chicago'));
- echo $dt->format('F j, Y, g:i a');
- //echo $data['graphql']['shortcode_media']['taken_at_timestamp'];
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement