get followers auto get coin


SUBMITTED BY: allif

DATE: Jan. 6, 2017, 2:13 a.m.

FORMAT: Text only

SIZE: 7.1 kB

HITS: 2336

  1. <?php
  2. error_reporting(E_ALL);
  3. $get = new getFollowers();
  4. $get->id = "idigmu"; // ID INSTAGRAMMU DISINI ! GAKUSAH SETTING" YANG LAIN CUK :)
  5. $get->signup(); // Ini register, biarin aja jangan dihapus karena penting!
  6. // Ini fungsi ambil coinnya, kreasikan!
  7. $x = $get->getContents();
  8. if(!empty($x['data']['followings'])){
  9. foreach($x['data']['followings'] as $dfid){
  10. $fid = $dfid['fid'];
  11. $action = $get->startTask($fid);
  12. echo $action['data']['credits'] . " ";
  13. }
  14. } else {
  15. $dat = $get->signup();
  16. echo "Session updated! ";
  17. }
  18. class getFollowers {
  19. /*
  20. Developer : Galih Akbar Moerbayaksa
  21. Team : Kome-Ine Creative
  22. License : Open Source (GPL v3)
  23. Github Source : https://github.com/komeine/get-followers
  24. Github User : https://github.com/komeine/
  25. */
  26. public $mid;
  27. public $session;
  28. public $atok;
  29. public $id;
  30. public function __construct($id = false){
  31. if($id && is_numeric($id)){
  32. $this->id = $id;
  33. }
  34. return $this;
  35. }
  36. public function addAccount($new_id){
  37. $time = date("U") * 1000;
  38. $content = '{"associate_id":"'.$new_id.'","app_id":302,"client_time":"'.$time.'","mid":"'.$this->mid.'","type":"instagram","sesn_id":"'.$this->session.'","signature":"'.HASH::hmac("302|4140957785|1478764336424|3a25e63c", "ad6edf5e4112445f95d9f94fcbd74e85").'"}';
  39. $base = 'https://ssafollow.api-alliance.com/follows/ssafollows/associate/client_add';
  40. $data = $this->http($base, $this->buildQuery($content));
  41. return $data;
  42. }
  43. public function addLikes($media_id, $target_id, $total){
  44. $content = '{"media_url":{"standard":"http:\/\/scontent-sit4-1.cdninstagram.com\/t51.2885-15\/e35\/14733179_644578785722220_7549668795372011520_n.jpg","low":"http:\/\/scontent-sit4-1.cdninstagram.com\/t51.2885-15\/s320x320\/e35\/14733179_644578785722220_7549668795372011520_n.jpg","thumbnail":"http:\/\/scontent-sit4-1.cdninstagram.com\/t51.2885-15\/s150x150\/e35\/14733179_644578785722220_7549668795372011520_n.jpg"},"media_id":"'.$media_id.'","credits":'.($total).',"quantity":'.$total.',"app_id":302,"mid":"'.$this->mid.'","sesn_id":"'.$this->session.'","usermeta":{"uid":"'.$target_id.'","fullname":"galihs123","username":"galihs123"}}';
  45. $base = 'https://ssafollow.api-alliance.com/follows/getfollowers/like/submit';
  46. $data = $this->http($base, $this->buildQuery($content));
  47. return $data;
  48. }
  49. public function getContents(){
  50. $content = '{"associate_id":"'.$this->id.'","app_id":302,"mid":"'.$this->mid.'","fetch_count":1,"sesn_id":"'.$this->session.'"}';
  51. $base = 'https://ssafollow.api-alliance.com/follows/getfollowers/fetch?content='.$content.'&signature='.HASH::hmac($content).'&sig_kv=5';
  52. return json_decode(@file_get_contents($base), true);
  53. }
  54. public function orderCheck(){
  55. $content = '{"sesn_id":"'.$this->session.'","app_id":302,"associate_id":"'.$this->id.'","mid":"'.$this->mid.'"}';
  56. $base = 'https://ssafollow.api-alliance.com/follows/getfollowers/task/status?content='.$content.'&signature='.HASH::hmac($content).'&sig_kv=5';
  57. return json_decode(@file_get_contents($base), true);
  58. }
  59. public function addOrder($total, $targetid, $targetUsername){
  60. $content = '{"credits":'.($total*2).',"quantity":'.$total.',"tobefollow":{"fid":"'.$targetid.'","portrait":"https:\/\/scontent.cdninstagram.com\/t51.2885-19\/11906329_960233084022564_1448528159_a.jpg","username":"'.$targetUsername.'","private":0},"app_id":302,"associate_id":"'.$this->id.'","mid":"'.$this->mid.'","sesn_id":"'.$this->session.'"}';
  61. $base = "https://ssafollow.api-alliance.com/follows/getfollowers/task/submit";
  62. $data = $this->http($base, $this->buildQuery($content));
  63. return $data;
  64. }
  65. public function startTask($fid){
  66. $content = '{"associate_id":"'.$this->id.'","app_id":302,"following_result":{"fid":"'.$fid.'","status":"success"},"mid":"'.$this->mid.'","sesn_id":"'.$this->session.'"}';
  67. $base = "https://ssafollow.api-alliance.com/follows/getfollowers/follow";
  68. $data = $this->http($base, $this->buildQuery($content));
  69. return $data;
  70. }
  71. public function updateRelay(){
  72. $content = '{"assets":{"basic":["credits"]},"sesn_id":"'.$this->session.'","app_id":302,"mid":"'.$this->mid.'"}';
  73. $base = "https://ssafollow.api-alliance.com/follows/ssafollows/asset/v1/query";
  74. $data = $this->http($base, $this->buildQuery($content));
  75. return $data;
  76. }
  77. public function signup($id_ig = false){
  78. if(!empty($this->id)){
  79. $id_ig = $this->id;
  80. }
  81. $content = '{"assets":{"path":"\/asset\/v1\/query","basic":[]},"get_followers":{"unfollowed":0},"account_info":{"refrl":"Amazon"},"tp_info":{"acnt_typ":"instagram","sid":"'.$id_ig.'","client_verified":1},"app_id":302,"device_info":{"dvc_id":"'.UUID::get(true).'","enbl_ftur":"EnabledFeatures001Test","app_vrsn":"1.0.8","dvc_tkn":"APA91bFxd-6IdRSysefy5caXeMEVk4EHUX2Jpgildi7bTyULZmDPmmrfRIrCfD2tWcuQ3Qc7HdeQS_G-w2NvfWxUmJ5Jw7GYUCf48sg5vRqs_oMFQy-5c6EWPC2Z7JRU3mjHzJX5tJu-","dvc_typ":"android","usr_seg":"","app_grp":"nuunnnnnnnnnnnnnnu","dvc_lctn_set":0,"restrct_usr":false,"locl":"in_ID","dvc_os_vrsn":"4.4.2","dvc_tzone":25200},"associates":{}}';
  82. $base = "https://ssafollow.api-alliance.com/follows/ssafollows/account/v1/signup";
  83. $data = $this->http($base, $this->buildQuery($content));
  84. $sessionid = $data['data']['main_account']['sesn_id'];
  85. $accesstoken = $data['data']['associates'][0]['access_token'];
  86. $id = $data['data']['associates'][0]['id'];
  87. $mid = $data['data']['main_account']['mid'];
  88. if(!empty($this->id)){
  89. $this->mid = $mid;
  90. $this->atok = $accesstoken;
  91. $this->session = $sessionid;
  92. return $this;
  93. } else {
  94. return $sessionid . ":" . $accesstoken . ":" . $id . ":" . $mid;
  95. }
  96. }
  97. private function buildQuery($content){
  98. $postdata = http_build_query(
  99. array(
  100. 'content' => $content,
  101. 'signature' => HASH::hmac($content),
  102. 'sig_kv' => 5,
  103. 'cten' => 'p'
  104. )
  105. );
  106. return $postdata;
  107. }
  108. private function http($base, $content){
  109. $opts = array('http' =>
  110. array(
  111. 'method' => 'POST',
  112. 'header' => 'Content-type: application/x-www-form-urlencoded',
  113. 'content' => $content
  114. )
  115. );
  116. $context = stream_context_create($opts);
  117. $result = @file_get_contents($base, false, $context);
  118. $result = json_decode($result, true);
  119. return $result;
  120. }
  121. }
  122. class HASH {
  123. public $key = 'Z^`)t(OdE{|w2{`U.O=e.hVX&1[kX@iH';
  124. static function hmac($data, $key = false){
  125. $h = new HASH();
  126. if(!empty($key)) $h->key = $key;
  127. return hash_hmac('sha256', $data, $h->key);
  128. }
  129. }
  130. class UUID {
  131. static function get($type){
  132. $uuid = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
  133. mt_rand(0, 0xffff), mt_rand(0, 0xffff),
  134. mt_rand(0, 0xffff),
  135. mt_rand(0, 0x0fff) | 0x4000,
  136. mt_rand(0, 0x3fff) | 0x8000,
  137. mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
  138. );
  139. return $type ? $uuid : str_replace('-', '', $uuid);
  140. }
  141. }

comments powered by Disqus