小编emi*_*loi的帖子

cURL代码取消关注Instagram取消关注者

<?php

Class Instagram
{
public $username;
public $password;
private $guid;
private $my_uid;
private $userAgent = 'Instagram 6.21.2 Android (19/4.4.2; 480dpi; 1152x1920; Meizu; MX4; mx4; mt6595; en_US)';
private $instaSignature ='25eace5393646842f0d0c3fb2ac7d3cfa15c052436ee86b5406a8433f54d24a5';
private $instagramUrl = 'https://i.instagram.com/api/v1/';



public function Login($username, $password) {
    $this->username = $username;
    $this->password = $password;    
    $this->guid = $this->GenerateGuid();
    $device_id = "android-" . $this->guid;  
    $data = '{"device_id":"'.$device_id.'","guid":"'.$this->guid.'","username":"'. $this->username.'","password":"'.$this->password.'","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}';
    $sig = $this->GenerateSignature($data);
    $data = 'signed_body='.$sig.'.'.urlencode($data).'&ig_sig_key_version=6';   
    $myid = $this->Request('accounts/login/', true, $data, false);  
    $decode = json_decode($myid[1], true); 
    $this->my_uid = $decode['logged_in_user']['pk'];
    print_r($this->my_uid); 
    return $myid;
} …
Run Code Online (Sandbox Code Playgroud)

php curl instagram

6
推荐指数
1
解决办法
533
查看次数

标签 统计

curl ×1

instagram ×1

php ×1