Skip to content

Commit

Permalink
1.0.13
Browse files Browse the repository at this point in the history
- Kullanıcı Bildirim Listesi Getirme
- Kullanıcı Mesaj İsteklerini Getirme
- Kullanıcı Mesaj Kutusunu Getirme
- Kullanıcı Takipçilerini Getirme
- Sahte Takipçi Tespiti
- Sahte Takip Edilen Tespiti
  • Loading branch information
Hasokeyk committed Apr 3, 2021
1 parent cb8a726 commit 74289b2
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 5 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ paylaşımlarını getirmek için get_user_posts('hasokeyk') yazmanız yeterlidi
| Giriş Yapmış Kullanıcı İstatistikleri | :heavy_check_mark: | [HAZIRLANIYOR](https://github.com/Hasokeyk/instagram/tree/main/examples) |
| Giriş Yapmış Kullanıcının En Az Etkileşimde Olduğu Kullanıcılar | :heavy_check_mark: | [HAZIRLANIYOR](https://github.com/Hasokeyk/instagram/tree/main/examples) |
| Giriş Yapmış Kullanıcının En Çok Gördüğü Kullanıcılar | :heavy_check_mark: | [HAZIRLANIYOR](https://github.com/Hasokeyk/instagram/tree/main/examples) |
| Kullanıcı Bildirim Listesi Getirme | :heavy_check_mark: | [HAZIRLANIYOR](https://github.com/Hasokeyk/instagram/tree/main/examples) |
| Kullanıcı Mesaj İsteklerini Getirme | :heavy_check_mark: | [HAZIRLANIYOR](https://github.com/Hasokeyk/instagram/tree/main/examples) |
| Kullanıcı Mesaj Kutusunu Getirme | :heavy_check_mark: | [HAZIRLANIYOR](https://github.com/Hasokeyk/instagram/tree/main/examples) |
| Kullanıcı Takipçilerini Getirme | :heavy_check_mark: | [HAZIRLANIYOR](https://github.com/Hasokeyk/instagram/tree/main/examples) |

## Paylaşım İşlemleri

Expand Down Expand Up @@ -194,11 +198,12 @@ paylaşımlarını getirmek için get_user_posts('hasokeyk') yazmanız yeterlidi
| Kalp Atma | :heavy_check_mark: | [HAZIRLANIYOR](https://github.com/Hasokeyk/instagram/tree/main/examples) |
| Görsel Atma | :heavy_check_mark: | [HAZIRLANIYOR](https://github.com/Hasokeyk/instagram/tree/main/examples) |

<!-- CONTRIBUTING -->
## Akıllı İşlemler

## Katkı Sağlayanlar

<!-- LICENSE -->
| İşlemler | Çalışıyor | Örnek Dosya |
| ------------- | ------------- | ------------- |
| Sahte Takipçi Tespiti | :heavy_check_mark: | [HAZIRLANIYOR](https://github.com/Hasokeyk/instagram/tree/main/examples) |
| Sahte Takip Edilen Tespiti | :heavy_check_mark: | [HAZIRLANIYOR](https://github.com/Hasokeyk/instagram/tree/main/examples) |

## Lisans

Expand Down
5 changes: 5 additions & 0 deletions src/instagram.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
require "instagram_statistics.php";
require "instagram_upload.php";
require "instagram_medias.php";
require "instagram_smart_events.php";

class instagram{

Expand All @@ -17,6 +18,8 @@ class instagram{
public $user = null;
public $statistics = null;
public $medias = null;
public $smart = null;
public $upload = null;

function __construct($username = null, $password = null){

Expand All @@ -27,6 +30,7 @@ function __construct($username = null, $password = null){
'user' => new instagram_user($username, $password, $this->functions),
'upload' => new instagram_upload($username, $password, $this->functions),
'medias' => new instagram_medias($username, $password, $this->functions),
'smart' => new instagram_smart_events($username, $password, $this->functions),
];

$this->request = new instagram_request($username, $password, $this->functions);
Expand All @@ -35,6 +39,7 @@ function __construct($username = null, $password = null){
$this->statistics = new instagram_statistics($username, $password, $this->functions);
$this->upload = new instagram_upload($username, $password, $this->functions);
$this->medias = new instagram_medias($username, $password, $this->functions);
$this->smart = new instagram_smart_events($username, $password, $this->functions);

}

Expand Down
2 changes: 1 addition & 1 deletion src/instagram_medias.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public function delete_comment_post($shortcode = null, $comment_id = null, $auto

}

public function share_media($shortcode = null, $username = null){
public function share_media_inbox($shortcode = null, $username = null){

if($shortcode != null and $username != null){

Expand Down
71 changes: 71 additions & 0 deletions src/instagram_smart_events.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php


namespace instagram;


class instagram_smart_events extends instagram_request{

public $username;
public $password;
public $functions;

function __construct($username, $password, $functions = null){
$this->username = $username;
$this->password = $password;
$this->functions = $functions;
}

public function get_fake_following_profile($username = null){

$username = $username??$this->username;
$user_id = $this->functions->user->get_user_id($username);
$url = 'https://i.instagram.com/api/v1/friendships/'.$user_id.'/following/?includes_hashtags=false&search_surface=follow_list_page&order=date_followed_earliest&query=&enable_groups=true&rank_token=650f704c-8711-47a8-a7f5-a7c90d8e23d8';
$json = $this->request($url);
$json = json_decode($json['body']);

$fake_following = [];
foreach($json->users as $user){
if($user->has_anonymous_profile_picture == true){
$fake_following[] = $user;
}
}

return $fake_following;

}

public function get_fake_followers_profile($username = null, $page = 1){

$username = $username??$this->username;
$user_id = $this->functions->user->get_user_id($username);
$url = 'https://i.instagram.com/api/v1/friendships/'.$user_id.'/followers/?includes_hashtags=false&search_surface=follow_list_page&order=date_followed_lates&query=&enable_groups=true&rank_token=650f704c-8711-47a8-a7f5-a7c90d8e23d8';
$json = $this->request($url);
$main_users = json_decode($json['body']);
$max_id = $main_users->next_max_id;

if($page > 1){
for($i = 0; $i < $page; $i++){
$url = 'https://i.instagram.com/api/v1/friendships/'.$user_id.'/followers/?search_surface=follow_list_page&max_id='.$max_id.'&query=&enable_groups=true&rank_token=83b852da-cc4a-4eff-8877-2f436ebf223c';
$json = $this->request($url);
$users = json_decode($json['body']);
foreach($users->users as $user){
$main_users->users[] = $user;
}
$max_id = $users->next_max_id;
}
sleep(1);
}

$fake_following = [];
foreach($main_users->users as $user){
if($user->has_anonymous_profile_picture == true){
$fake_following[] = $user;
}
}

return $fake_following;

}

}
57 changes: 57 additions & 0 deletions src/instagram_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,63 @@ public function get_my_statistic(){

}

public function get_my_notification(){

$url = 'https://i.instagram.com/api/v1/news/inbox/?mark_as_seen=false&timezone_offset=10800&push_disabled=true';
$json = $this->request($url);
$json = json_decode($json['body']);

return $json;

}

public function get_my_pending_inbox(){

$url = 'https://i.instagram.com/api/v1/direct_v2/pending_inbox/?visual_message_return_type=unseen&persistentBadging=true&push_disabled=true';
$json = $this->request($url);
$json = json_decode($json['body']);

return $json;

}

public function get_my_inbox(){

$url = 'https://i.instagram.com/api/v1/direct_v2/inbox/?visual_message_return_type=unseen&thread_message_limit=100&persistentBadging=true&limit=20&push_disabled=true&fetch_reason=manual_refresh';
$json = $this->request($url);
$json = json_decode($json['body']);

return $json;

}

public function get_my_followers(){

$url = 'https://i.instagram.com/api/v1/friendships/44433622125/following/?includes_hashtags=true&search_surface=follow_list_page&query=&enable_groups=true&rank_token=4c6947e0-bebe-4f69-a7bf-24be28dc4990';
$json = $this->request($url);
$json = json_decode($json['body']);

return $json;

}

public function get_friendships_status_by_username($username = null){

if($username != null){
$user_id = $this->get_user_id($username);
$url = 'https://i.instagram.com/api/v1/friendships/show_many/';
$post_data = [
'user_ids' => $user_id,
];
$json = $this->request($url, 'POST', $post_data);
$json = json_decode($json['body']);
return $json;

}
return false;

}

private function generate_client_context(){
return (round(microtime(true) * 1000) << 22 | random_int(PHP_INT_MIN, PHP_INT_MAX) & 4194303) & PHP_INT_MAX;
}
Expand Down

0 comments on commit 74289b2

Please sign in to comment.