Advertisement
tobitaz

smsnotis.php

Oct 7th, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.17 KB | None | 0 0
  1.      <?php
  2.  
  3.  
  4.  
  5. $token = "CAAAA.....ZDZD";
  6.  
  7.  
  8.  
  9.  
  10. $f = file_get_contents("https://graph.facebook.com/me/notifications?access_token=".$token);
  11. $jn = json_decode($f)->data;
  12.  
  13.  
  14. foreach($jn as $jjj)
  15. {
  16.  
  17. $kum = file_get_contents("notis.txt");
  18.  
  19.    
  20.    $cek = strripos($kum, $jjj->id);
  21.    if($cek > 1)
  22.     {
  23.     }
  24.     else
  25.     {
  26.    $fop = fopen("notis.txt", "a+");
  27.               fwrite($fop, $jjj->id."\n");
  28.               fclose($fop);
  29.      
  30. //send notis ke phone
  31.  
  32. $data = array('country' => '60',
  33.                        'to' => '60123456789',
  34.                       'msg' => $jjj->title,
  35.                      'agreed' => '1');
  36.  
  37. $u = "Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10";
  38.  
  39. $cu = curl_init();
  40.           curl_setopt($cu, CURLOPT_URL, 'http://dosms.me/sms.php');
  41.           curl_setopt($cu, CURLOPT_POST, 1);
  42.           curl_setopt($cu, CURLOPT_POSTFIELDS, $data);
  43.           curl_setopt($cu, CURLOPT_USERAGENT, $u);
  44.           curl_setopt($cu, CURLOPT_RETURNTRANSFER, true);
  45.           curl_exec($cu);
  46.           curl_close($cu);
  47.  
  48.  
  49.  
  50.       }
  51.  
  52.  
  53. }
  54.  
  55.  
  56. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement