With this PHP library, you can use all features of the instagram Mobile App
Demo
·
Feedback
Türkçe doküman için tıklayın
Coin | Wallet |
---|---|
ETH | 0x2091be5b1840b10a841376c366ec0475771b4ec8 |
BTC | 12Set9KZGXWD64pbeGsdqZCJZofxyK77LP |
This project is made in PHP library of all instagram mobile app features. This library can send exactly same queries like mobile app and returns server responses.
Please read carefully.
- You must have to "composer" application on your PC. For installation https://getcomposer.org/download/
- PHP 7.4 or above
- you must determine your root(working) folder after that open console ( terminal )
composer require hasokeyk/instagram
- Firsty download repository
git clone https://github.com/hasokeyk/instagram.git
- Use the command below to download the required libraries.
composer install
You must login before each operation. In your first login operation, the system will be cached and your operation will run faster.
<?php
use instagram\instagram;
require "/vendor/autoload.php";
$username = 'username';
$password = 'password';
$instagram = new instagram($username,$password);
$login = $instagram->login->login();
if($login){
echo 'Login success';
}else{
echo 'Login Fail';
}
//LOGIN CONTROL
$login_control = $instagram->login->login_control();
if($login_control){
echo 'Login True';
}else{
echo 'Login False';
}
//LOGIN CONTROL
In your first login attemp, if two factor authorization are enabled, instagram will send you a code. If you enter the code into the input area, yout login operation will be completed automatically. After your next logins, if yout IP is not changed, you can login without asking code.
<?php
use instagram\instagram;
require "/vendor/autoload.php";
$username = 'username';
$password = 'password';
$instagram = new instagram($username, $password);
if(isset($_REQUEST['two_factor_login_code'], $_REQUEST['two_factor_identifier']) and !empty($_REQUEST['two_factor_login_code']) and !empty($_REQUEST['two_factor_identifier'])){
$code = trim($_REQUEST['two_factor_login_code']);
$token = trim($_REQUEST['two_factor_identifier']);
$two_factor_login = $instagram->login->two_factor_login($code, $token);
print_r($two_factor_login);
}else{
$login = $instagram->login->login();
if(isset($login->two_factor_identifier) and !empty($login->two_factor_identifier)){
echo <<<END
<form action="" method="post">
<input type="hidden" name="two_factor_identifier" value="$login->two_factor_identifier">
<input type="text" name="two_factor_login_code">
<input type="submit" value="Login">
</form>
END;
}
else if($instagram->login->login_control()){
echo 'Login Success';
}
else{
echo 'Login Fail';
}
}
When you run the below code, you will get last 50 posts of user you are logged into. If you want another accounts posts get_user_posts('hasokeyk') please use this.
<?php
use instagram\instagram;
require "../vendor/autoload.php";
$username = 'username';
$password = 'password';
$instagram = new instagram($username,$password);
$login = $instagram->login->login_control();
if($login){
$user_posts = $instagram->user->get_user_posts();
print_r($user_posts);
}else{
echo 'Login Fail';
}
Operation | Working | Example File |
---|---|---|
Login | ✔️ | instagram-user-login.php |
2-Factor Auth Login | ✔️ | instagram-user-two-factor-login.php |
Login width proxy | ✔️ | instagram-user-login-with-proxy.php |
Getting posts of logged in account | ✔️ | instagram-user-info.php |
Getting statictics of logged in account | ✔️ | instagram-user-statistics.php |
Getting least Viewed of logged in account | ✔️ | instagram-user-least-interacted-with.php |
Getting most Viewed Users by Logged In | ✔️ | instagram-user-my-most-seen-in-feed.php |
Changing profile image | ✔️ | instagram-user-change-profil-pic.php |
Follow an account | ✔️ | instagram-user-follow.php |
Unffollow an account | ✔️ | instagram-user-follow.php |
Unfollow the Account Itself | ✔️ | instagram-user-follow.php |
Getting notification list of logged in account | ✔️ | instagram-user-my-notification.php |
Getting message request of logged in account | ✔️ | instagram-user-my-pending-inbox.php |
Getting message inbox of logged in account | ✔️ | instagram-user-my-inbox.php |
Getting Account Followers | ✔️ | instagram-user-my-followers.php |
Getting Post | ✔️ | instagram-user-get-posts.php |
Operation | Work | Example |
---|---|---|
Getting share statistics | ✔️ | instagram-user-get-posts-statistics.php |
Image Share | ✔️ | instagram-media-share-photo.php |
Video Share | ❌ | COMING SOON |
Story Share | ❌ | COMING SOON |
Carousel Share | ❌ | COMING SOON |
Share Likes | ✔️ | instagram-media-like.php |
Share Unlike | ✔️ | instagram-media-unlike.php |
Share Save | ✔️ | instagram-media-save.php |
Share Unsave | ✔️ | instagram-media-unsave.php |
Share Comment | ✔️ | instagram-media-send-comment.php |
Share delete comment | ✔️ | instagram-media-del-comment.php |
Send share to message | ✔️ | instagram-media-send-media-inbox.php |
Operation | Work | Example |
---|---|---|
Send message as Text | ✔️ | instagram-users-send-inbox.php |
Send message as Link | ❌ | COMING SOON |
Send Heart | ✔️ | instagram-users-send-inbox.php |
Send Image | ✔️ | instagram-users-send-inbox.php |
Flame Text | ✔️ | instagram-users-send-inbox.php |
Message with present | ✔️ | instagram-users-send-inbox.php |
Message with confetti | ✔️ | instagram-users-send-inbox.php |
Message with heart | ✔️ | instagram-users-send-inbox.php |
Operation | Work | Example |
---|---|---|
Fake followeing detection | ✔️ | instagram-smart-get-fake-followers-profile.php |
Fake followers detection | ✔️ | instagram-smart-get-fake-following-profile.php |
Accounts You Should Follow | ✔️ | instagram-smart-get-my-must-follow.php |
Secret Followers | ✔️ | instagram-smart-get-my-secret-followers.php |
Asım Murat YILMAZ - GITHUB
You can download and use it as long as this project is under development. If used for other purposes The person who wrote the codes is not responsible. By downloading and using this project, you agree to this.
patreon: https://www.patreon.com/hasokeyk
Hasan Yüksektepe - INSTAGRAM
Website : https://hayatikodla.net