Hellrocker

Untitled

Feb 2nd, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. <?php
  2.  
  3. $graph_url = "https://graph.facebook.com/278952135548721/posts?limit=1&fields=id&access_token=CAAGZAwVFNCKgBAANhEYok6Xh7Q7UZBeTZCUqwPDLYhRZCmNn0igI8SE339jSn2zjxCpA1JUmXHm55XKVXslhdKKoTF3b5sLsiZBVd0ylYwX3MIGOnRyzn0T2XVywwoPKP7ML9WZCqELGRuIGxoM8ia05CiUiqcbgsb4wzTuBKkvKaqb7TPt2VnPtprRZBWda4kZD";
  4. $new = json_decode(file_get_contents($graph_url), true);
  5. //var_dump($new);
  6. $latestpostid = $new['data']['0']['id'];
  7. $testpostid = file_get_contents('ids.txt', NULL, NULL, 0, 32);
  8. if($latestpostid == $testpostid) {
  9. echo "NO NEW POSTS";
  10. }
  11. else {
  12. echo "NEW POSTS";
  13. exec("wget http://fgethell.xyz/iospush/iosnotif.php");
  14. unlink("ids.txt");
  15. file_put_contents('ids.txt', $latestpostid);
  16. }
  17.  
  18. ?>
Add Comment
Please, Sign In to add comment