instagram php curl follow not working -


$useragent = $this->generateuseragent();                 $cookie = json_decode($x->cookie);                 $optionalheaders = array( );                 $optionalheaders[] = "accept: */*";                 $optionalheaders[] = "accept-language: tr;q=1";                 $optionalheaders[] = "referer: https://www.instagram.com/$a/";                 $optionalheaders[] = "origin: https://www.instagram.com";                 $optionalheaders[] = "x-csrftoken: " . $x->csrf;                 $optionalheaders[] = "x-requested-with: xmlhttprequest";                 $optionalheaders[] = "x-instagram-ajax: 1";                 $optionalheaders[] = "content-type:application/x-www-form-urlencoded";                 $optionalheaders[] = "accept-encoding:gzip, deflate, br";                 $ch = curl_init();                 curl_setopt($ch, curlopt_url, "https://www.instagram.com/web/friendships/$userid/follow/");                 curl_setopt($ch, curlopt_useragent, $useragent);                 curl_setopt($ch, curlopt_header, true);                 curl_setopt($ch, curlopt_returntransfer, true);                 curl_setopt($ch, curlopt_followlocation, true);                 curl_setopt($ch, curlopt_httpheader, $optionalheaders);                 curl_setopt($ch, curlopt_verbose, false);                 curl_setopt($ch, curlopt_ssl_verifypeer, false);                 curl_setopt($ch, curlopt_ssl_verifyhost, false);                 curl_setopt($ch, curlopt_cookiefile, $this->cerezler. '/'.$x->username.$this->uzanti);                 curl_setopt($ch, curlopt_cookiejar, $this->cerezler. '/'.$x->username.$this->uzanti);                 $k = $this->mc->addcurl($ch);                 echo $k->response."<hr>"; 

result == > {"status": "ok"} not working

must => {"result": "following", "status": "ok"}

why ' "result": "following" ' not appear?


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -