Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function Cget($url,$ref=0) {
- $headers = Array(
- 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg',
- 'Connection: Keep-Alive',
- 'Accept: */*',
- 'Content-Type: application/x-www-form-urlencoded; charset=utf-8'
- );
- $process = curl_init($url);
- curl_setopt($process, CURLOPT_HTTPHEADER, $headers);
- curl_setopt($process, CURLOPT_HEADER, 0);
- if($ref)
- {
- curl_setopt($process, CURLOPT_REFERER, $ref);
- }
- curl_setopt($process, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36');
- curl_setopt($process, CURLOPT_COOKIEFILE, realpath('cookie.txt'));
- curl_setopt($process, CURLOPT_COOKIEJAR, realpath('cookie.txt'));
- curl_setopt($process,CURLOPT_ENCODING , 'gzip');
- curl_setopt($process, CURLOPT_TIMEOUT, 30);
- curl_setopt($process, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);
- $return = curl_exec($process);
- curl_close($process);
- return $return;
- }
- function getLocation($url) {
- $headers = Array(
- 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg',
- 'Connection: Keep-Alive',
- 'Accept: */*',
- 'Content-Type: application/x-www-form-urlencoded; charset=utf-8'
- );
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36');
- curl_setopt($ch, CURLOPT_COOKIEFILE, realpath('cookie.txt'));
- curl_setopt($ch, CURLOPT_COOKIEJAR, realpath('cookie.txt'));
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
- curl_setopt($ch, CURLOPT_HEADER, TRUE);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, FALSE);
- $response = curl_exec($ch);
- preg_match_all('/^Location:(.*)$/mi', $response, $matches);
- curl_close($ch);
- return trim($matches[1][0]);
- }
- function Cpost($url,$data, $ref=0) {
- $headers = Array(
- 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg',
- 'Connection: Keep-Alive',
- 'Accept: */*',
- 'Content-Type: application/x-www-form-urlencoded; charset=utf-8',
- 'Referer: https://www.pornhubpremium.com/premium/login'
- );
- $process = curl_init($url);
- curl_setopt($process, CURLOPT_URL, $url);
- curl_setopt($process, CURLOPT_HEADER, 1);
- //curl_setopt($process, CURLOPT_COOKIESESSION, false);
- curl_setopt($process, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36');
- curl_setopt($process, CURLOPT_COOKIEFILE, realpath('cookie.txt'));
- curl_setopt($process, CURLOPT_COOKIEJAR, realpath('cookie.txt'));
- curl_setopt($process, CURLOPT_SSL_VERIFYPEER, false);
- if($ref)
- {
- curl_setopt($process, CURLOPT_REFERER, $ref);
- }
- curl_setopt($process,CURLOPT_ENCODING , 'gzip');
- curl_setopt($process, CURLOPT_POSTFIELDS, $data);
- curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($process, CURLOPT_POST, 1);
- $return = curl_exec($process);
- curl_close($process);
- return $return;
- }
- function curl($url){
- $ch = @curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- $head[] = "Connection: keep-alive";
- $head[] = "Keep-Alive: 300";
- $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
- $head[] = "Accept-Language: en-us,en;q=0.5";
- curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36');
- curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
- curl_setopt($ch, CURLOPT_TIMEOUT, 60);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
- $page = curl_exec($ch);
- curl_close($ch);
- return $page;
- }
- function explode_by($begin,$end,$data) {
- $data = explode($begin,$data);
- $data = explode($end,$data[1]);
- return $data[0];
- }
- //login
- $html = Cget("https://www.pornhubpremium.com/premium/login");
- $token = explode_by('id="token" value="','"',$html);
- $user = "litlb78";
- $pass = "camaro91";
- $data = "username=$user&password=$pass&token=$token&redirect=&from=pc_premium_login&segment=straight";
- $auth = "https://www.pornhubpremium.com/user/authenticate";
- $response = Cpost($auth,$data);
- echo $response;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement