Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "https://m2.olx.com.br/contas/do_login/");
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
- curl_setopt($ch, CURLOPT_COOKIEJAR, getcwd() . '/cookie.txt');
- curl_setopt($ch, CURLOPT_COOKIEFILE, getcwd() . '/cookie.txt');
- curl_setopt($ch, CURLOPT_HTTPHEADER, array(
- 'origin:https://m2.olx.com.br',
- 'referer:https://m2.olx.com.br/login',
- 'upgrade-insecure-requests:1',
- 'user-agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0'
- ));
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, "email=michaaeldouglas177@gmail.com&password=teste114");
- $data = curl_exec($ch);
- curl_setopt($ch, CURLOPT_URL, 'https://m2.olx.com.br/contas/meus_anuncios/');
- curl_setopt($ch, CURLOPT_HEADER, true);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, false);
- curl_setopt($ch, CURLOPT_LOW_SPEED_LIMIT, false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_COOKIESESSION, true);
- curl_setopt($ch, CURLOPT_COOKIEJAR, getcwd() . '/cookie.txt');
- curl_setopt($ch, CURLOPT_COOKIEFILE, getcwd() . '/cookie.txt');
- curl_setopt($ch, CURLOPT_VERBOSE, true);
- $data = curl_exec($ch);
- curl_setopt($ch, CURLOPT_URL, 'https://www3.olx.com.br/account');
- curl_setopt($ch, CURLOPT_HEADER, true);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, false);
- curl_setopt($ch, CURLOPT_LOW_SPEED_LIMIT, false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_COOKIESESSION, true);
- curl_setopt($ch, CURLOPT_COOKIEJAR, getcwd() . '/cookie.txt');
- curl_setopt($ch, CURLOPT_COOKIEFILE, getcwd() . '/cookie.txt');
- curl_setopt($ch, CURLOPT_VERBOSE, true);
- $data = curl_exec($ch);
- curl_setopt($ch, CURLOPT_URL, 'https://www3.olx.com.br/account/userads/');
- curl_setopt($ch, CURLOPT_HEADER, true);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, false);
- curl_setopt($ch, CURLOPT_LOW_SPEED_LIMIT, false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_COOKIESESSION, true);
- curl_setopt($ch, CURLOPT_COOKIEJAR, getcwd() . '/cookie.txt');
- curl_setopt($ch, CURLOPT_COOKIEFILE, getcwd() . '/cookie.txt');
- curl_setopt($ch, CURLOPT_VERBOSE, true);
- $data = curl_exec($ch);
- die($data);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement