Can not get the link from xvideos

Discussion in 'PHP' started by BoyIT, Aug 15, 2016.

  1. #1
    See I consider this code
    <?php
    error_reporting(E_ERROR | E_PARSE);
    function curl_Xvideos($url)
    {
        $ch = @curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
        $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 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3B48b Safari/419.3');
        curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_ENCODING , 'gzip, deflate');
        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;
    
         $url = str_replace(' ', '', $url);
            if(!empty($url)):
                    curl_setopt($curl = curl_init($url), CURLOPT_RETURNTRANSFER, 1);
                    preg_match("/flv_url=(.+)url_bigthumb=([^&]+)/i", curl_exec($curl), $infos);
                    curl_close($curl);
                    header("Location: ".urldecode($infos[1]));
            endif;
    }
    
    function Xvideos($link) {
        $view_source = curl_Xvideos($link);
        $data = explode("new HTML5Player('html5video',", $view_source);
        $data = explode("http://img", $data[1]);
        $data = explode("', '", $data[0]);
        foreach($data as $i => $mp4)
        {
            if(strpos($mp4, '/videos/mp4/'))
            $list .= 'ลิงก์เสริม 360P=>'.trim($mp4).'|';
        }
        return rtrim($list, '|');
    }
    Code (markup):

     
    BoyIT, Aug 15, 2016 IP
  2. Tuhin1234

    Tuhin1234 Active Member

    Messages:
    178
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    71
    #2
    check pm
     
    Tuhin1234, Aug 17, 2016 IP