突然,我的服务器无法播放php视频"加载播放器错误:…"我在本地主机上试过,它有效


Suddenly my server cannot play php video "error loading player:..." i tried it on localhost it works

很抱歉我的英语不够好。

我需要你的帮助,我的在线电影流媒体网站有问题。突然我的jwplayer php视频插件不工作,它显示"错误加载媒体:文件无法播放"。

我有播放器的源代码,我已经在另一个服务器上(我朋友的一个)试过了,它工作得很好。

你可以在这里看到:http://tvlangsung.com/google.php(我的),http://klikmaxbet.com/video/google.php(我的朋友)

这是我的google。php

    <?php
require_once("moviesclass.php");
class google extends moviesclass{
    var $match_link = "https?:'/'/(?:www'.)?(?:drive|docs)'.google'.com'/(?:file'/d'/|open'?id'=)?([a-z0-9A-Z_-]+)(?:'/.+)?";   
    var $match_link2 = "https?:'/'/(?:www'.)?(?:drive|docs)'.google'.com'/folderview'?id'=([a-z0-9A-Z_-]+)[^'#]*?(?:'#('d+))?";
    public function getid(){  
        if($this->match_link($this->url,$m)){
            if(isset($m[1])){
                $this->id = $m[1];
            }      
        }elseif($this->match_link($this->url,$m2,$this->match_link2))  {    
            $this->id = $m2[1];
            if(isset($m2[2])){
                $this->season = $m2[2];
            } else $this->season = 0;   
            $this->url = "https://drive.google.com/folderview?id=".$this->id;
            $this->content = $this->curl->get($this->url,'',2);         
            preg_match_all("/'"([a-z0-9A-Z_-]+)'",,'"https:'/'/drive'.google'.com/",$this->content, $m3);           
            $this->url = "https://drive.google.com/file/d/".$m3[1][$this->season]."/view";
            $this->id = $m3[1][$this->season];            
        }      
    }    
    public function getlink(){     
        $r = rand(2,2);
        $this->content = $this->{"get_id$r"}($this->id);        
        $this->getlinks();
    }    
    public function getlinks(){      
        preg_match("/'['"fmt_stream_map'",'"([^'"]+)'"/",$this->content,$m);      
        $this->content = "['"". $m[1] ."'"]";
        $this->content = json_decode($this->content);
        $this->content = $this->content[0];       
        $data = explode(",",$this->content);     
        $quality = array(
        '22'=>720 ,
        '43'=>360 ,
        '18'=>360 ,
        '5'=>240 ,
        '36'=>240 ,
        '17'=>144 ,
        '59'=>480,
        '35'=>480,
        '34'=>360,
        '37'=>1080,
        '78'=> 480,
        );        
        foreach ($data as $mmm) {
            $mm = explode("|",$mmm);
            if(!in_array($mm[0],array(18,22,78,37,59))) continue;
            $mp4 = array('link_mp4'=>'', 'quality'=>'');
            $mp4['link_mp4']= self::link($mm[1]); //($mm[1]); //
            $mp4['quality'] = $quality[$mm[0]];  
            $this->links[] = $mp4;  
        }
    } 
    public static function link($link){
        $y2 = explode("?",$link);
        parse_str($y2[1],$t);
        self::shuffle_assoc($t);
        $t = http_build_query($t);
        $t = $y2[0]."?".$t;
        return preg_replace("/'/[^'/]+'.google'.com/","/redirector.googlevideo.com",$t).'&filename=video.mp4';
    }    
    function get_id2($id){
         $u = 'https://drive.google.com/file/d/'.$id.'/view?pli=1';         
         $this->curl->get('https://www.proxfree.com/','',2);
         $this->curl->httpheader = array(
         'Referer:https://de.proxfree.com/permalink.php?url=eKcKvRAsZMJp3EkmD1K78%2Bqx%2FrqnRtIHySNzmMxUbxvukNW5JP6nKAmc2AyX9FkQmU6CpqFZFnVpyAapyWpAgn5e%2BzzJjvsiVUNPNOfcYMz5IrJpuGhvPAMGjbAdBlWkwWYx6yQSoO5dPHK886sH65BRFhxnPeME9DD6Sk3wiA4%3D&bit=1',
        'Upgrade-Insecure-Requests:1',
        'Content-Type:application/x-www-form-urlencoded',
        'Cache-Control:max-age=0',
        'Connection:keep-alive',
        'Accept-Language:en-US,en;q=0.8,vi;q=0.6,und;q=0.4',  
         );  
         $y=( $this->curl->post('https://de.proxfree.com/request.php?do=go&bit=1','pfipDropdown=default&get='.urlencode($u),4) ); 
        if (isset($y[0]["Location"])) 
        return $this->curl->get($y[0]["Location"],'',2);
    }   
}
 $u = 'https://drive.google.com/file/d/0B0DAwt_Tig7ASDg5TWl3VFM5TVk/edit';
  $x = new google($u);  
  $xx = ($x ->links);
 ?>  
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="pt-BR">
<head>
<meta charset="UTF-8"/>
<meta name="robots" content="noindex" />
<META NAME="GOOGLEBOT" CONTENT="NOINDEX" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<script type="text/javascript" src="https://ssl.p.jwpcdn.com/player/v/7.4.4/jwplayer.js"></script>
<script type="text/javascript">jwplayer.key = "dWwDdbLI0ul1clbtlw+4/UHPxlYmLoE9Ii9QEw==";</script>
<style type="text/css">
*{margin:0;padding:0}#picasa{position:absolute;width:100%!important;height:100%!important}
</style>
</head>
<body>
<div>
<center>
<div id="picasa" class="picasa"></div>'
<script type="text/javascript">
    var playerInstance = jwplayer("picasa");
        playerInstance.setup({
        id:'picasa',
        controls: true,
        displaytitle: true,
        flashplayer: "http://p.jwpcdn.com/player/v/7.4.4/jwplayer.flash.swf",
        width: "100%",
        height: "100%",
        aspectratio: "16:9",
        fullscreen: "true",
        primary: 'html5',
        provider: 'http',
        autostart: false,
        abouttext: "JWPlayer",
        aboutlink: "http://jwplayer.com/",
        image:"/jwplayer/thumb.jpg",
        sources: [<?php
foreach ( $xx as $i){
    if($i["quality"] == '1080'){
    echo '{file: "'.$i["link_mp4"].'",label:"1080p",type: "video/mp4"},';}
    else if($i["quality"] == '720'){
    echo '{file: "'.$i["link_mp4"].'",label:"720p",type: "video/mp4"},';}
    else if($i["quality"] == '480'){
    echo '{file: "'.$i["link_mp4"].'",label:"480p",type: "video/mp4"},';}
    else if($i["quality"] == '360'){
    echo '{file: "'.$i["link_mp4"].'",label:"360p",type: "video/mp4",default: "true"}';}        
}
?>],
    });

                        playerInstance.addButton(
                                    //This portion is what designates the graphic used for the button
                                    "http://i.imgur.com/cAHz5k9.png",
                                    "Download Video",
                                    function() {
                                        var kI = playerInstance.getPlaylistItem(),
                                        kcQ = playerInstance.getCurrentQuality();
                                        if(kcQ < 0) { kcQ =0;}
                                        //var kF = kI.sources[kcQ].file+"?itag="+kcQ+"&type=video/mp4&title=GoogleVideoName";
                                        //console.log(kF);
                                        if(kI.sources[kcQ].file.lastIndexOf('redirector.googlevideo.com') > 0) {
                                            var kF = kI.sources[kcQ].file+"&title=wpplayer-org";
                                        } 
                                        window.open(kF,'_blank');
                                    },
                                    "download"
                                );

</script>
</center>
</div>
</body>
</html>

这是我的moviesclass.php

    <?php
require_once("curl.class.php");
class moviesclass{
    var $url;
    var $id = false;
    var $season;
    var $link;
    var $links=array();
    var $curl;
    var $content;
    var $match_link = '';
    public function __construct($url='', $run = true){
        if(preg_match("/^http/",$url))
            $this->url = $url;
        else $this->id = $id;
        if($run) $this->run();
    }
    public function run(){
        $this->curl = new CURL;
        if(!$this->id) $this->getid();
        $this->getlink();
    }
    public function getid(){
    }
    public function getlink(){
    }
    public function getlinks(){
    }
    public function decode($link){
    }
    public function is_picase(){
        return preg_match("/picasaweb/",$this->link);
    }

    public function is_yt(){
        return preg_match("/youtube'.com/",$this->link);
    }
    public function is_dr(){
        return preg_match("/(drive|docs)'.google'.com/",$this->link);
    }
    public function picasa(){
    }
    public function match_link($url, &$m=false, $match=false){
        return preg_match("/^".($match!==false?$match:$this->match_link)."$/", $url, $m);
    }
    public function json(){
        $arr_data =array('link_stream'=>'','error_message'=>'');  
        if($this->links){  
            if(count($this->links)>0){
                $arr_data['link_stream'] = $this->links;  
            }else{
                $arr_data['error_message'] = 'ERROR';
            }
        }else{  
             $arr_data['error_message'] = 'ERROR';  
        }  
        return (json_encode($arr_data));
    }
    public static function getDirectLink($url) {
        $urlInfo = parse_url($url);
        //var_dump($urlInfo);
        $out  = "GET  {$url} HTTP/1.1'r'n";
        $out .= "Host: {$urlInfo['host']}'r'n";
        $out .= "User-Agent: {$_SERVER['HTTP_USER_AGENT']}'r'n";
        $out .= "Connection: Close'r'n'r'n";    
        $con = @fsockopen('ssl://'. $urlInfo['host'], 443, $errno, $errstr, 20);
        if (!$con){
            return $errstr." ".$errno; 
        }
        fwrite($con, $out);
        $data = '';
        while (!feof($con)) {
            $data .= fgets($con, 512);
        }
        fclose($con);
        preg_match("!'r'n(?:Location|URI): *(.*?) *'r'n!", $data, $matches);
        $url = $matches[1];
        return trim($url);
    }
    public static function httpDirectLink($url) {
        $urlInfo = parse_url($url);
        //var_dump($urlInfo);
        $out  = "GET  {$url} HTTP/1.1'r'n";
        $out .= "Host: {$urlInfo['host']}'r'n";
        $out .= "User-Agent: {$_SERVER['HTTP_USER_AGENT']}'r'n";
        $out .= "Connection: Close'r'n'r'n";    
        $con = @fsockopen($urlInfo['host'], 80, $errno, $errstr, 20);
        if (!$con){
            return $errstr." ".$errno; 
        }
        fwrite($con, $out);
        $data = '';
        while (!feof($con)) {
            $data .= fgets($con, 512);
        }
        fclose($con);//var_dump($data);die();
        preg_match("!'r'n(?:Location|URI): *(.*?) *'r'n!", $data, $matches);
        $url = $matches[1];
        return trim($url);
    }
    public function DirectLink($url) {
        $c = $this->curl->get($url,'',4);
        //var_dump($c);die();
        return isset($c[0]["Location"])?$c[0]["Location"]:false;
        if(isset($c[0]["Location"])){
            echo $c[0]["Location"];
            $this->curl->referer = '';
            echo $this->curl->get($c[0]["Location"],'');die();
        }
    }
    public static function ping($ips){
        $ip = $ips[0];
        $port = $ips[1];
        $con = @fsockopen($ip, $port, $errno, $errstr, 10);
        if (!$con){
            return false;
        }
        return true;
    }
    public function getlinksyt(){
        require_once("youtube.php");
        //var_dump($this->link); 
        $zing = new youtube($this->link);
        $this->links = $zing->links;
    }
    public function getlinksdr(){
        require_once("google.php");
        $zing = new google($this->link);
        $this->links = $zing->links;
    }
    public static function shuffle_assoc(&$array) {
        $keys = array_keys($array);
        shuffle($keys);
        foreach($keys as $key) {
            $new[$key] = $array[$key];
        }
        $array = $new;
        return true;
    }
}
?>

这是我的curl。class。php

    <?php
/**
 * @class: CURL
 * @version: 1.0
 * @author: phptuts
 * @link: http://2tuts.com/
 */
class CURL
{
    var $contents;
    var $_header;
    var $headers = array();
    var $body;
    var $url = "";
    var $realm;
    var $ua = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0";
    var $proxy;
    var $prtype;
    var $tout = 10;
    var $opts = false;
    var $cookiefile = "cookie.txt";
    var $httpheader = array();
    var $follow = false;
    var $referer = "";
    var $ch;
    function exec($method, $url, $vars = "", $h = 1)
    {
        $this->ch = curl_init();
        curl_setopt($this->ch, CURLOPT_URL, $url);
        curl_setopt($this->ch, CURLOPT_HEADER, ($h == 2) ? 0 : 1);
        if (is_array($this->realm)) {
            curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
            curl_setopt($this->ch, CURLOPT_USERPWD, $this->realm[0] . ':' . $this->realm[1]);
        }
        if ($this->proxy != "") {
            if (strstr($this->proxy, "@")) {
                $t = explode("@", $this->proxy);
                $up = $t[0];
                $ip = $t[1];
            }
            curl_setopt($this->ch, CURLOPT_HTTPPROXYTUNNEL, 1) ;
            curl_setopt($this->ch, CURLOPT_PROXY, isset($ip) && $ip ? $ip : $this->proxy);
            curl_setopt($this->ch, CURLOPT_PROXYTYPE, $this->prtype);
            if (isset($up) && $up) {
                curl_setopt($this->ch, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
                curl_setopt($this->ch, CURLOPT_PROXYUSERPWD, $up);
            }
        }
        if ($this->ua)
            curl_setopt($this->ch, CURLOPT_USERAGENT, $this->ua);
        if ($this->referer || $this->url)
            curl_setopt($this->ch, CURLOPT_REFERER, $this->referer ? $this->referer : $this->
                url);
        if ($this->follow)
            curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);
        if (strncmp($url, "https", 6)) {
            curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0);
            curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0);
        }
        curl_setopt($this->ch, CURLOPT_COOKIEJAR, $this->cookiefile);
        curl_setopt($this->ch, CURLOPT_COOKIEFILE, $this->cookiefile);
        curl_setopt($this->ch, CURLOPT_TIMEOUT, $this->tout);
        if (count($this->httpheader)) {
            curl_setopt($this->ch, CURLOPT_HTTPHEADER, $this->httpheader);
        }
        curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, $this->tout);
        if ($method == 'POST') {
            curl_setopt($this->ch, CURLOPT_POST, 1);
            curl_setopt($this->ch, CURLOPT_POSTFIELDS, $vars);
        }
        if (is_array($this->opts) && $this->opts != false) {
            foreach ($this->opts as $k => $v) {
                curl_setopt($this->ch, $k, $v);
            }
        }
        $data = curl_exec($this->ch);
        $this->url = $url;
        if ($data) {
            if (preg_match("/^HTTP'/1'.1 302/", $data) && $h != 2 && strstr($data, "'r'n'r'nHTTP/1.1 200")) {
                $pos = strpos($data, "'r'n'r'n");
                $data = substr($data, $pos + 4);
            }
            if ($h == 1 || $h == 2)
                return $data;
            else {
                $pos = strpos($data, "'r'n'r'n");
                $this->body = substr($data, $pos + 4);
                $this->_header = substr($data, 0, $pos);
                $this->_header = explode("'r'n", trim($this->_header));
                foreach ($this->_header as $v) {
                    $v = explode(":", $v, 2);
                    $this->headers[$v[0]] = isset($v[1]) ? trim($v[1]) : '';
                }
                return $h == 3 ? $this->headers : array($this->headers, $this->body);
            }
        } else {
            return curl_error($this->ch);
        }
    }
    function proxy($proxy, $prtype = CURLPROXY_HTTP)
    { //CURLPROXY_SOCKS5
        $this->proxy = $proxy;
        $this->prtype = $prtype;
    }
    function settimeout($timeout)
    {
        $this->tout = $timeout;
    }
    function get($url,$vars, $h = 1)
    {
        $ret = $this->exec('GET', $url, $vars, $h);
        //$this->close();
        return $ret;
    }
    function post($url, $vars, $h = 1)
    {
        $ret = $this->exec('POST', $url, $vars, $h);
        //$this->close();
        return $ret;
    }
    function setopt($opt, $value = true)
    {
        $this->opts[$opt] = $value;
    }
    function seturl($url)
    {
        $this->url = $url;
    }
    function close()
    {
        curl_close($this->ch);
    }
}

?>

请帮忙,我已经联系了我的服务器提供商,他们什么也做不了。(

请检查服务器上的php设置