Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- set_time_limit(0);
- function cURL($url,$header,$post,$cookie){
- $ch = curl_init();
- curl_setopt($ch,CURLOPT_URL,$url);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
- curl_setopt($ch, CURLOPT_POST, true);
- curl_Setopt($ch,CURLOPT_CUSTOMREQUEST,($post)?"POST":"GET");
- curl_setopt($ch, CURLOPT_POSTFIELDS,$post);
- curl_setopt($ch,CURLOPT_COOKIE,$cookie);
- curl_setopt($ch,CURLOPT_HEADER,$header);
- $ex = curl_exec($ch);
- curl_close($ch);
- return $ex;
- }
- function PegarCookie(){
- $post = "username=fernandocurty&password=12345678";
- $p_login = cURL("https://www.instagram.com/accounts/login/ajax/",1,$post,null);
- //preg_match("/Set-Cookie: ([^\n]+)/",$p_login,$r_cookie);
- return $p_login;
- }
- echo PegarCookie();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement