Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $graph_url = "https://graph.facebook.com/278952135548721/posts?limit=1&fields=id&access_token=CAAGZAwVFNCKgBAANhEYok6Xh7Q7UZBeTZCUqwPDLYhRZCmNn0igI8SE339jSn2zjxCpA1JUmXHm55XKVXslhdKKoTF3b5sLsiZBVd0ylYwX3MIGOnRyzn0T2XVywwoPKP7ML9WZCqELGRuIGxoM8ia05CiUiqcbgsb4wzTuBKkvKaqb7TPt2VnPtprRZBWda4kZD";
- $new = json_decode(file_get_contents($graph_url), true);
- //var_dump($new);
- $latestpostid = $new['data']['0']['id'];
- $testpostid = file_get_contents('ids.txt', NULL, NULL, 0, 32);
- if($latestpostid == $testpostid) {
- echo "NO NEW POSTS";
- }
- else {
- echo "NEW POSTS";
- exec("wget http://fgethell.xyz/iospush/iosnotif.php");
- unlink("ids.txt");
- file_put_contents('ids.txt', $latestpostid);
- }
- ?>
Add Comment
Please, Sign In to add comment