• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP enString函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中enString函数的典型用法代码示例。如果您正苦于以下问题:PHP enString函数的具体用法?PHP enString怎么用?PHP enString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了enString函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: tvg

function tvg()
{
    global $web, $web_descargada;
    $retfull = $web_descargada;
    //$retfull=CargaWebCurl($web);
    //debe haber un video
    if (enString($retfull, "flowplayer(")) {
        //netConnectionUrl: "rtmp://media1.crtvg.es:80/vod" //Para VOD
        $p = strpos($retfull, 'netConnectionUrl: "') + 19;
        $f = strpos($retfull, '"', $p);
        $ret = substr($retfull, $p, $f - $p);
        dbug($ret);
        //clip: {
        //url: "mp4:02/0000/0000_20121206000000.mp4",
        $clip = strpos($retfull, 'clip: {');
        $p = strpos($retfull, 'url: "', $clip) + 6;
        $f = strpos($retfull, '"', $p);
        $ret = $ret . '/' . substr($retfull, $p, $f - $p);
        dbug($ret);
        //title: "Tourilandia recibe a visita de David Vidal",
        $p = strpos($retfull, 'title: "', $clip) + 8;
        $f = strpos($retfull, '"', $p);
        $titulo = substr($retfull, $p, $f - $p);
        $titulo = limpiaTitulo($titulo);
        dbug('titulo=' . $titulo);
        //imagen
        //backgroundImage: "url(http://www.crtvg.es/files/web/000020121206000000.jpg)"
        $p = strpos($retfull, 'backgroundImage: "url(') + 22;
        $f = strpos($retfull, ')', $p);
        $imagen = substr($retfull, $p, $f - $p);
        dbug('imagen=' . $imagen);
    }
    $obtenido = array('titulo' => $titulo, 'imagen' => $imagen, 'enlaces' => array(array('url' => $ret, 'tipo' => 'rtmp')));
    finalCadena($obtenido);
}
开发者ID:sehcel,项目名称:Descargavideos,代码行数:35,代码来源:tvg.php


示例2: calcula

 function calcula()
 {
     if (!preg_match('#<form name="F1" method="POST" action=\'\'>#i', $this->web_descargada)) {
         setErrorWebIntera('No se encuentra ningún vídeo');
         return;
     }
     $id = substr($this->web, strposF($this->web, 'allmyvideos.net/'));
     dbug('id = ' . $id);
     $web_embedPlayedTo = 'http://allmyvideos.net/' . $id;
     $retfull = CargaWebCurl($web_embedPlayedTo, '', array('referer' => 'http://web.com'));
     if (enString($retfull, '"image" : "')) {
         $mode = 'lanzaAllMyVideosNet2';
         $imagen = entre1y2($retfull, '"image" : "', '"');
     } else {
         $imagen = '';
         $web_embedPlayedTo = 'http://allmyvideos.net/' . $id;
         $mode = 'lanzaAllMyVideosNet1';
     }
     if (enString($this->web_descargada, 'filename=')) {
         $titulo = entre1y2($this->web_descargada, 'filename=', '"');
         if (enString($titulo, '&')) {
             $titulo = substr($titulo, 0, strpos($titulo, '&'));
         }
         $titulo = urldecode($titulo);
     } else {
         $titulo = 'AllMyVideos ID: ' . $id;
     }
     // FALLA EN EL CALLBACK DEL SWF. EDITAR EL SWF
     $urlJS = 'function lanzaAllMyVideosNet(){' . 'if(typeof DESCARGADOR_ARCHIVOS_SWF === "undefined"){' . 'setTimeout(lanzaAllMyVideosNet, 200)' . '}' . 'else if(DESCARGADOR_ARCHIVOS_SWF === true){' . 'getFlashMovie("descargador_archivos").CargaWeb({' . '"url":"' . $web_embedPlayedTo . '",' . '"metodo":"GET"' . '}, "' . $mode . '");' . '}' . '}' . 'function lanzaAllMyVideosNet1(txt){' . 'var regex = /<input.*?name="(.*?)".*?value="(.*?)".*?>/ig;' . 'var post = "";' . 'var res = [];' . 'while((res = regex.exec(txt)) != null){' . 'if(res[1] === "referer")res[2] = "";' . 'post += res[1] + "=" + res[2] +"&";' . '}' . 'getFlashMovie("descargador_archivos").CargaWeb({' . '"url":"' . $web_embedPlayedTo . '",' . '"metodo":"POST",' . '"post":post' . '}, "lanzaAllMyVideosNet2");' . '}' . 'function lanzaAllMyVideosNet2(txt){' . 'if(txt.indexOf(".setup(") !== -1){' . 'txt = txt.substr(txt.indexOf(".setup("));' . '}' . 'var urls = txt.split("\\"sources\\" : ")[1].split("]")[0]+"]";' . 'var urls = JSON.parse(urls);' . 'urls.sort(function(a,b){return parseInt(a["label"])<parseInt(b["label"])});' . 'url = urls[0]["file"];' . 'mostrarResultado(url);' . '}' . 'function mostrarResultado(entrada){' . 'finalizar(entrada,"Descargar");' . '}' . 'function mostrarFallo(){' . 'finalizar("","Ha ocurrido un error");' . '}' . 'if(typeof descargador_archivos === "undefined"){' . 'D.g("enlaces").innerHTML += \'' . genera_swf_object('/util/fla/f/allmyvideos.net') . '\';' . 'var descargador_archivos = D.g("descargador_archivos");' . '}' . 'lanzaAllMyVideosNet();';
     $obtenido = array('titulo' => $titulo, 'imagen' => $imagen, 'enlaces' => array(array('url' => $urlJS, 'tipo' => 'jsFlash')));
     finalCadena($obtenido);
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:32,代码来源:allmyvideosnet.php


示例3: calcula

 function calcula()
 {
     //mirar si hay video
     $obtenido = array('titulo' => 'Canal de Historia', 'enlaces' => array());
     if (!enString($this->web_descargada, '<iframe')) {
         return;
     }
     preg_match_all('@<iframe src="(.*?)"@', $this->web_descargada, $matches);
     dbug_r($matches);
     foreach ($matches[1] as $url) {
         dbug($url);
         if (strpos($url, '//player.vimeo') === 0) {
             $url = 'http:' . $url;
             $vimeo = new Vimeo();
             $url_descargada = CargaWebCurl($url);
             $vimeo->init($url, $url_descargada);
             $ret = $vimeo->calcula();
             dbug_r($ret);
         } else {
             $adnstream = new Adnstream();
             $url_descargada = CargaWebCurl($url);
             $adnstream->init($url, $url_descargada);
             $ret = $adnstream->calcula();
             dbug_r($ret);
         }
         $obtenido['enlaces'][] = array('titulo' => $ret['titulo']);
         foreach ($ret['enlaces'] as $enlace) {
             $obtenido['enlaces'][] = $enlace;
         }
         if (!isset($obtenido['imagen'])) {
             $obtenido['imagen'] = $ret['imagen'];
         }
     }
     finalCadena($obtenido);
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:35,代码来源:canaldehistoria.php


示例4: soso

function soso()
{
    global $web;
    $res = CargaWebCurl('http://cgi.music.soso.com/fcgi-bin/m.q?p=1&source=1&t=1&w=' . urlencode($web));
    //recortar a solo los enlaces
    $p = strposF($res, '<div id="results_box">');
    $f = strpos($res, 'id="right_box"', $p);
    $res = substr($res, $p, $f - $p);
    $resultados = array('buscador' => 'soso.com', 'enlaces' => array());
    $p1 = 0;
    for ($i = 0; $i < 20 && ($p1 = strpos($res, 'onmouseover="soso.ie6hover(this,1)"', $p1)); $i++) {
        $p1++;
        //url
        $p = strposF($res, '<td class="data">', $p1);
        $p = strposF($res, 'FI', $p);
        $f = strpos($res, ";", $p);
        $url = substr($res, $p, $f - $p);
        if (!enString($url, "qqmusic.qq.com")) {
            //título
            $p = strposF($res, 'class="s_name">', $p1);
            $f = strpos($res, '</a>', $p);
            $tit = strip_tags(substr($res, $p, $f - $p));
            //peso
            $p = strposF($res, '<td class="size">', $p1);
            $f = strpos($res, "</", $p);
            $peso = substr($res, $p, $f - $p);
            $peso = trim(strtr($peso, array("M" => "")));
            $r = array('url' => $url, 'titulo' => $tit, 'peso' => $peso, 'preview' => 1);
            $resultados['enlaces'][] = $r;
        }
    }
    dbug_r($resultados);
    return $resultados;
}
开发者ID:sehcel,项目名称:Descargavideos,代码行数:34,代码来源:soso.php


示例5: calcula

 function calcula()
 {
     $enlace = array();
     //&file=media/53/Video/10/1/10107_BAJA.mp4&
     //file
     $file = entre1y2($this->web_descargada, 'file=', '&');
     //image=http://mediateca.regmurcia.com/MediatecaCRM/ServletLink?METHOD=MEDIATECA%26accion=imagen%26id=10107
     $p = strrposF($file, '/');
     $f = strpos($file, '_', $p);
     $imagen = 'http://mediateca.regmurcia.com/MediatecaCRM/ServletLink?METHOD=MEDIATECA&accion=imagen&id=' . substr($file, $p, $f - $p);
     //&title=Metros cuadrados&
     $titulo = utf8_encode(entre1y2($this->web_descargada, '&title=', '&'));
     $titulo = limpiaTitulo($titulo);
     //&description=Programa nº 62.
     $descripcion = utf8_encode(entre1y2($this->web_descargada, '&description=', "'"));
     $descripcion = limpiaTitulo($descripcion, 300);
     $obtenido = array('titulo' => $titulo, 'imagen' => $imagen, 'descripcion' => $descripcion, 'enlaces' => array());
     //server
     $server = entre1y2($this->web_descargada, 'streamer=', '&');
     $tipo = "http";
     if (enString($server, 'rtmp')) {
         $server = substr($server, 0, strrpos($server, '/'));
         $file = 'mp4:' . $file;
         $obtenido['enlaces'][] = array('url' => '-', 'rtmpdump' => '-r "' . $server . '" -y "' . $file . '"', 'nombre_archivo' => generaNombreWindowsValido($titulo . '.mp4'), 'tipo' => 'rtmpConcreto');
     } elseif (enString($server, 'http')) {
         $obtenido['enlaces'][] = array('url' => $server . '/' . $file, 'tipo' => 'http');
     }
     finalCadena($obtenido, true);
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:29,代码来源:7rm.php


示例6: calcula

 function calcula()
 {
     //$url = "http://www.crunchyroll.com/xml/?req=RpcApiVideoPlayer_GetStandardConfig&media_id={$id}&video_format={$format}&video_quality={$quality}&auto_play=1&aff=crunchyroll-website&show_pop_out_controls=1&pop_out_disable_message=Only+All-Access+Members+and+Anime+Members+can+pop+out+this+video.+Get+your+membership+today%21";
     if (POST_BM) {
         $ret = $this->web_descargada;
     } else {
         if (!enString($this->web_descargada, '"config_url":"')) {
             define('IGNORA_AVISO_RAPIDO', true);
             setErrorWebIntera(USE_BOOKMARKLET_2);
             return;
         }
         $url = entre1y2($this->web_descargada, '"config_url":"', '"');
         $url = urldecode($url);
         /*
         $url = "http://www.crunchyroll.com/xml/?req=RpcApiVideoPlayer_GetStandardConfig&media_id=649575&video_format=106&video_quality=60&auto_play=1&aff=crunchyroll-website&show_pop_out_controls=1&pop_out_disable_message=Only+All-Access+Members+and+Anime+Members+can+pop+out+this+video.+Get+your+membership+today%21";
         $post = "current%5Fpage=http%3A%2F%2Fwww%2Ecrunchyroll%2Ecom%2Fkill%2Dla%2Dkill%2Fepisode%2D24%2Dpast%2Dthe%2Dinfinite%2Ddarkness%2D649575%3Fp480%3D1";
         $ret = CargaWebCurl($url, $post, 0, '', array('Content-type: application/x-www-form-urlencoded'));
         dbug_($ret);
         */
         $post = "current%5Fpage=" . urlencode($this->web);
         $ret = CargaWebCurl($url, $post, 0, '', array('Content-type: application/x-www-form-urlencoded'));
     }
     dbug_($ret);
     $titulo = entre1y2($ret, '<series_title>', '</') . ' - ' . entre1y2($ret, '<episode_title>', '</');
     $obtenido = array('titulo' => $titulo, 'imagen' => entre1y2($ret, '<episode_image_url>', '</'), 'enlaces' => array(array('url' => '-', 'rtmpdump' => '-r "' . entre1y2($ret, '<host>', '</') . '" ' . '-y "' . entre1y2($ret, '<file>', '</') . '"', 'nombre_archivo' => generaNombreWindowsValido($titulo) . '.mp4', 'tipo' => 'rtmpConcreto', 'extension' => 'mp4')));
     finalCadena($obtenido);
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:27,代码来源:crunchyrollcom.php


示例7: calcula

 function calcula()
 {
     if (enString($this->web, '&')) {
         $idVideo = entre1y2($this->web, 'v=', '&');
     } else {
         $idVideo = substr($this->web, strposF($this->web, 'v='));
     }
     dbug('idVideo=' . $idVideo);
     //Código
     $titulo = trim(entre1y2($this->web_descargada, '<title>', '</title>'));
     dbug('titulo=' . $titulo);
     $imagen = '';
     /*
     // En caso de que No hubiera bloqueo de IP
     $retfull = CargaWebCurl('http://www.magnovideo.com/player_config.php?mdid='.$idVideo);
     
     
     
     $imagen = entre1y2($retfull,'<tile_thumbs>','</tile_thumbs>');
     dbug('imagen='.$imagen);
     
     
     $video_name = entre1y2($retfull,'<video_name>','</video_name>');
     $sto = entre1y2($retfull,'<sto>','</sto>');
     
     
     $url = substr($imagen, 0, -18).$video_name.'?'.$sto;
     */
     $urlJS = 'function lanzaMagnovideo(){' . 'if(typeof DESCARGADOR_ARCHIVOS_SWF === "undefined"){' . 'setTimeout(lanzaMagnovideo, 200)' . '}' . 'else if(DESCARGADOR_ARCHIVOS_SWF === true){' . 'getFlashMovie("descargador_archivos").CargaWeb({"url":"http://www.magnovideo.com/player_config.php?mdid=' . $idVideo . '"}, "procesaMagnovideo");' . '}' . '}' . 'function procesaMagnovideo(txt){' . 'var imagen = txt.split("<tile_thumbs>")[1].split("</tile_thumbs>")[0];' . 'var video_name = txt.split("<video_name>")[1].split("</video_name>")[0];' . 'var sto = txt.split("<sto>")[1].split("</sto>")[0];' . 'var url = imagen.split("tmpsmall/tiles.jpg")[0] +video_name + "?" + sto;' . 'mostrarResultado(url);' . '}' . 'function mostrarResultado(entrada){' . 'finalizar(entrada,"Descargar");' . '}' . 'function mostrarFallo(){' . 'finalizar("","No se ha encontrado ningún resultado");' . '}' . 'if(typeof descargador_archivos === "undefined"){' . 'D.g("enlaces").innerHTML += \'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="0" height="0" id="descargador_archivos" align="middle">' . '<param name="movie" value="/util/fla/f/ajofeifo.swf" />' . '<param name="quality" value="high" />' . '<param name="bgcolor" value="#000" />' . '<param name="allowScriptAccess" value="sameDomain" />' . '<!--[if !IE]>-->' . '<embed src="/util/fla/f/ajofeifo.swf" quality="high" bgcolor="#000"' . 'width="0" height="0" name="descargador_archivos" align="middle"' . 'play="true" loop="true" quality="high" allowScriptAccess="sameDomain"' . 'type="application/x-shockwave-flash"' . 'pluginspage="http://www.macromedia.com/go/getflashplayer">' . '</embed>' . '<!--<![endif]-->' . '</object>\';' . 'var descargador_archivos = D.g("descargador_archivos");' . '}' . 'lanzaMagnovideo();';
     $obtenido = array('titulo' => $titulo, 'imagen' => $imagen, 'enlaces' => array(array('url' => $urlJS, 'tipo' => 'jsFlash')));
     finalCadena($obtenido);
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:32,代码来源:magnovideo.php


示例8: calcula

 function calcula()
 {
     //titulo
     $titulo = 'LiveLeak';
     dbug('titulo=' . $titulo);
     //imagen
     $imagen = entre1y2($this->web_descargada, 'image: "', '"');
     dbug('imagen=' . $imagen);
     if (enString($this->web_descargada, 'config: "')) {
         $config = entre1y2($this->web_descargada, 'config: "', '"');
         dbug_($config);
         $config = explode('&', $config);
         dbug_r($config);
         $url = '';
         foreach ($config as $elem) {
             if (strpos($elem, 'hd_file_url') === 0) {
                 $url = urldecode(substr($elem, strposF($elem, '=')));
                 break;
             }
             if (strpos($elem, 'file_url') === 0) {
                 $url = urldecode(substr($elem, strposF($elem, '=')));
             }
         }
     } else {
         preg_match('#file: "(http.*?\\.mp4.*?)"#', $this->web_descargada, $matches);
         dbug_r($matches);
         $url = $matches[1];
     }
     dbug_r($url);
     $obtenido = array('titulo' => $titulo, 'imagen' => $imagen, 'enlaces' => array(array('url_txt' => 'Descargar', 'url' => $url, 'tipo' => 'http')));
     finalCadena($obtenido);
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:32,代码来源:liveleak.php


示例9: calcula

 function calcula()
 {
     $obtenido = array('enlaces' => array());
     //raido o tv
     if (enString($this->web_descargada, "#radio")) {
         $p = strpos($this->web_descargada, 'http://podcastdl.');
         $f = strpos($this->web_descargada, '"', $p);
         $ret = substr($this->web_descargada, $p, $f - $p);
         dbug('url=' . $ret);
         array_push($obtenido['enlaces'], array('url' => $ret, 'tipo' => 'http'));
         $imagen = entre1y2($this->web_descargada, '<div class="imagen"><img src="', '"');
         dbug('imagen=' . $imagen);
     }
     if (enString($this->web_descargada, "#tv")) {
         $rtmp = 'rtmp://' . entre1y2($this->web_descargada, 'rtmp://', '"');
         if (enString($rtmp, "#")) {
             $f = strpos($rtmp, '#');
             if (enString($rtmp, "#tv")) {
                 $f = strpos($rtmp, '#', $f + 1);
             }
             $rtmp = substr($rtmp, 0, $f);
         }
         $rtmp = strtr($rtmp, array("#" => ""));
         dbug('rtmp=' . $rtmp);
         //if(isiPad)
         $http = entre1y2($this->web_descargada, 'if(isiPad)', '</script>');
         //poster="/sites/default/files/extremaduranoticas_nuevo2.jpg"
         $imagen = "http://www.canalextremadura.es" . entre1y2($http, 'poster="', '"');
         dbug('imagen=' . $imagen);
         $http = entre1y2($http, 'src="', '"');
         array_push($obtenido['enlaces'], array('titulo' => 'Calidad Baja', 'url' => $http, 'tipo' => 'http'));
         array_push($obtenido['enlaces'], array('titulo' => 'Calidad Alta', 'url' => $rtmp, 'tipo' => 'rtmp'));
     }
     if (enString($this->web_descargada, ".mp4#")) {
         $rtmp = 'rtmp://' . entre1y2($this->web_descargada, 'rtmp://', '.mp4') . '.mp4';
         dbug('rtmp=' . $rtmp);
         //if(isiPad)
         $http = entre1y2($this->web_descargada, 'data-iosUrl="', '"');
         //poster="/sites/default/files/extremaduranoticas_nuevo2.jpg"
         $imagen = "http://www.canalextremadura.es/" . entre1y2($http, '#/', "#");
         dbug('imagen=' . $imagen);
         //if(isiPad)
         $http = "http://" . entre1y2($http, 'http://', '#');
         array_push($obtenido['enlaces'], array('titulo' => 'Calidad Baja', 'url' => $http, 'url_txt' => 'Descargar', 'tipo' => 'http'));
         array_push($obtenido['enlaces'], array('titulo' => 'Calidad Alta', 'url' => $rtmp, 'tipo' => 'rtmp'));
     }
     //<h1 class="title">Extremadura 2 (17/05/12)</h1>
     if (enString($this->web_descargada, '<h1 class="title">')) {
         $titulo = entre1y2($this->web_descargada, '<h1 class="title">', '</h1>');
     } else {
         $p = strpos($this->web_descargada, '.mp4');
         $p = strpos($this->web_descargada, '<a', $p);
         $titulo = entre1y2_a($this->web_descargada, $p, '>', '</');
     }
     $titulo = limpiaTitulo($titulo);
     dbug('titulo=' . $titulo);
     $obtenido['titulo'] = $titulo;
     $obtenido['imagen'] = $imagen;
     finalCadena($obtenido);
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:60,代码来源:canalextremadura.php


示例10: calcula

 function calcula()
 {
     //http://www.cope.es/player/id=2013072310430001&activo=6
     if (enString($this->web_descargada, "_url_xml_datos:")) {
         dbug("audio o video por xml");
         //_url_xml_datos:'/proyecto/fragmentosJSP/playerxml.jsp?id=2013072310430001,1,33,13,,1411',
         //http://www.cope.es/proyecto/fragmentosJSP/playerxml.jsp?id=2013072310430001,1,33,13,,1411
         $url = "http://www.cope.es" . entre1y2($this->web_descargada, "_url_xml_datos:'", "'");
         //http://www.cope.es/proyecto/fragmentosJSP/playerxml.jsp?id=2013072310430001,1,33,13,,1411
         $ret = CargaWebCurl($url);
         //mp3 y mp4: mp4->id=2013051613420001,1,30,,,1411
         $p = strposF($ret, 'type="content"');
         //$f=strposF($this->web_descargada,"'",$p);
         //http://www.cope.es/proyecto/fragmentosJSP/playerxml.jsp?id=2013072310430001,1,33,13,,1411
         $url = entre1y2_a($ret, $p, "<url>", "</url>");
         //http://vod.cope.es/audio/2013/07/23/audio_13745695177069462491.mp3
         //imagen
         $imagen = "http://www.cope.es/" . entre1y2($ret, "<img>", "</img>");
     } elseif (enString($this->web_descargada, "addCustomPlayer(")) {
         //addCustomPlayer('1iynycahpn4lw1ppzh0l6r5z1a', '15wugu5n3ruow1j9kwr3ma3tqz', '177dxsxbyqz8h18z4sldn5awz2', 686, 466, 'perf1iynycahpn4lw1ppzh0l6r5z1a-177dxsxbyqz8h18z4sldn5awz2', 'eplayer17', {age:1354724063000});
         //xml.eplayer.performgroup.com/eplayer/mrss/1iynycahpn4lw1ppzh0l6r5z1a/15wugu5n3ruow1j9kwr3ma3tqz//7-12
         //xml.eplayer.performgroup.com/eplayer/mrss/1iynycahpn4lw1ppzh0l6r5z1a/15wugu5n3ruow1j9kwr3ma3tqz
         preg_match("@addCustomPlayer\\('(.*?)',.*?'(.*?)'@", $this->web_descargada, $matches);
         $aCargar = 'http://xml.eplayer.performgroup.com/eplayer/mrss/' . $matches[1] . '/' . $matches[2];
         $xml = CargaWebCurl($aCargar);
         //dbug($xml);
         preg_match_all("@<item>[\\s\\S]*?</item>@", $xml, $matches);
         dbug_r($matches);
         foreach ($matches[0] as $item) {
             $urlTXT = entre1y2($item, '<title>', '</title>');
             $p = strrpos($item, 'url=');
             $url = entre1y2_a($item, $p, '"', '"');
             $obtenido['enlaces'][] = array('titulo' => $urlTXT, 'url' => $url, 'tipo' => 'rtmp');
         }
         $obtenido['titulo'] = 'Vídeos';
         $obtenido['imagen'] = 'http://www.' . DOMINIO . '/canales/cope.png';
         finalCadena($obtenido);
         return;
     } elseif (enString($this->web_descargada, '/proyecto/fragmentosJSP/playerxml.jsp')) {
         $ret = CargaWebCurl('http://www.cope.es' . desde1a2($this->web_descargada, '/proyecto/fragmentosJSP/playerxml.jsp', '"'));
         dbug_($ret);
         $url = entre1y2($ret, '<urlHtml>', '</');
         $obtenido = array('titulo' => 'Cope', 'imagen' => 'http://www.' . DOMINIO . '/canales/cope.png', 'enlaces' => array(array('url' => $url, 'url_txt' => 'Descargar', 'tipo' => 'http')));
         finalCadena($obtenido);
         return;
     } else {
         setErrorWebIntera('No se ha encontrado nada.');
         return;
     }
     //titulo
     $titulo = entre1y2($this->web_descargada, "<title>", "|");
     $obtenido = array('titulo' => $titulo, 'imagen' => $imagen, 'enlaces' => array(array('url' => $url, 'tipo' => 'http')));
     finalCadena($obtenido);
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:54,代码来源:cope.php


示例11: calcula

 function calcula()
 {
     /*
     "clip":{"url":"mp4:/_archivos/videos/web/4334/4334.mp4"}
     "netConnectionUrl":"rtmp://alacarta.aragontelevision.es/vod"
     "playlist":[{"url":"mp4:/_archivos/videos/web/4334/4334.mp4"}]
     
     http://alacarta.aragontelevision.es/_archivos/videos/web/4334/4334.mp4
     */
     $imagen = 'http://www.' . DOMINIO . '/canales/aragontv.png';
     $obtenido = array('enlaces' => array());
     //un solo video
     if (enString($this->web_descargada, 'flowplayer(')) {
         dbug('simple');
         $titulo = entre1y2($this->web_descargada, '<div class="apartado"><h2>', '</h2>');
         $titulo = limpiaTitulo($titulo);
         if (stringContains($titulo, array('</', 'Server:'))) {
             dbug('titulo fallido, usando <title>');
             $titulo = entre1y2($this->web_descargada, '<title>', '</');
             $titulo = limpiaTitulo($titulo);
         }
         dbug('titulo=' . $titulo);
         $obtenido['enlaces'][] = $this->SacarVideo($this->web_descargada, $titulo);
     } elseif (enString($this->web_descargada, 'list-not-even')) {
         dbug('multi');
         $p = strpos($this->web_descargada, '<div class="apartado">');
         $titulo = entre1y2_a($this->web_descargada, $p, '<h2>', '</h2>');
         //en la pagina principal y otras el titulo estará mal, por lo que poner uno genérico
         if (enString($titulo, '<')) {
             $titulo = 'Aragon TV';
         }
         $titulo = limpiaTitulo($titulo);
         dbug('titulo=' . $titulo);
         $videos = substr_count($this->web_descargada, '<span>Ver video</span>');
         dbug('total videos=' . $videos);
         $last = 0;
         for ($i = 0; $i < $videos; $i++) {
             $last = strposF($this->web_descargada, '<div id="idv', $last);
             $url = 'http://alacarta.aragontelevision.es/ajax/ajax.php?id=' . entre1y2_a($this->web_descargada, $last, '_', '"');
             //encontrar ya el titulo del vídeo
             $f = strpos($this->web_descargada, 'fecha', $last);
             $parte = substr($this->web_descargada, $last, $f - $last);
             $p = strrpos($parte, '<a');
             $nombre = entre1y2_a($parte, $p, 'title="', '"');
             $extracto = CargaWebCurl($url);
             $obtenido['enlaces'][] = $this->SacarVideoPorId($extracto, $nombre);
         }
     }
     $obtenido['titulo'] = $titulo;
     $obtenido['imagen'] = $imagen;
     finalCadena($obtenido, false);
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:52,代码来源:aragontv.php


示例12: resuelvePlayer

 function resuelvePlayer($ret)
 {
     //return -> agregar a obtenido>enlaces
     if (enString($ret, "urlHTML5:'http://")) {
         $url = entre1y2($ret, "urlHTML5:'", "'");
     } else {
         $url = entre1y2($ret, "href:'", "'");
     }
     //titulo
     $p = strposF($ret, "<a");
     $titulo = utf8_encode(strip_tags(entre1y2_a($ret, $p, ">", "</a")));
     return array(array('titulo' => $titulo), array('url_txt' => "Descargar", 'url' => $url, 'tipo' => 'http'));
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:13,代码来源:cadenaser.php


示例13: calcula

 function calcula()
 {
     //titulo
     $titulo = utf8_encode(entre1y2($this->web_descargada, '<title>', '<'));
     //utf-8... mirar esto
     $titulo = limpiaTitulo($titulo);
     dbug('titulo=' . $titulo);
     $p = strpos($this->web_descargada, 'og:image');
     $imagen = entre1y2_a($this->web_descargada, $p, 'content="', '"');
     dbug('imagen=' . $imagen);
     if (enString($this->web_descargada, 'og:video')) {
         $p = strpos($this->web_descargada, 'og:video');
         $url = entre1y2_a($this->web_descargada, $p, 'content="', '"');
         dbug('video=' . $url);
         $obtenido = array('titulo' => $titulo, 'imagen' => $imagen, 'enlaces' => array(array('url' => $url, 'tipo' => 'http')));
     } elseif (enString($this->web_descargada, '<object class="BrightcoveExperience"')) {
         $obtenido = array('titulo' => $titulo, 'imagen' => $imagen, 'enlaces' => array());
         require_once 'brightcove-funciones.php';
         /*
         $ejemplo = 'AAMAAAABAEZjb20uYnJpZ2h0Y292ZS5leHBlcmllbmNlLkV4cGVyaWVuY2VSdW50aW1lRmFjYWRlLmdldERhdGFGb3JFeHBlcmllbmNlAAIvMQAAAe4KAAAAAgIAKGQ4Y2ZhOGIwZWQwYWVlM2YyMmRmZWRlMGYyZTU4NzRjYjViNGFmNjcRCmNjY29tLmJyaWdodGNvdmUuZXhwZXJpZW5jZS5WaWV3ZXJFeHBlcmllbmNlUmVxdWVzdCFjb250ZW50T3ZlcnJpZGVzGWV4cGVyaWVuY2VJZAdVUkwTcGxheWVyS2V5GWRlbGl2ZXJ5VHlwZRFUVExUb2tlbgkDAQqBA1Njb20uYnJpZ2h0Y292ZS5leHBlcmllbmNlLkNvbnRlbnRPdmVycmlkZRtjb250ZW50UmVmSWRzDXRhcmdldBVjb250ZW50SWRzF2NvbnRlbnRUeXBlE2NvbnRlbnRJZBtmZWF0dXJlZFJlZklkGWNvbnRlbnRSZWZJZBVmZWF0dXJlZElkAQYXdmlkZW9QbGF5ZXIBBAAFQoobzh2jSAABAQV/////4AAAAAVCg917rY7IAAaBF2h0dHA6Ly93d3cudnRlbGV2aXNpb24uZXMvcHJvZ3JhbWFzL3ZheWF2LzIwMTQvMDUvMjcvMDAzMV8zNTg4MzQwNTYxMDAxLmh0bQZlQVF+fixBQUFDZXpINWhNa34sa29OVmZFd3lwcTZXeGYyS01zN3EtM2V1R0wyOU1Pck0Ff////+AAAAAGAQ==';
         $ejemplo = base64_decode($ejemplo);
         print_r(brightcove_decode($ejemplo));
         */
         preg_match('/<param value="(.*?)" name="playerID"/', $this->web_descargada, $matches);
         $experienceID = $matches[1];
         preg_match('/<param value="(.*?)" name="playerKey"/', $this->web_descargada, $matches);
         $playerKey = $matches[1];
         preg_match('/<param value="(.*?)" name="@videoPlayer"/', $this->web_descargada, $matches);
         $contentId = $matches[1];
         $messagebroker = "http://c.brightcove.com/services/messagebroker/amf?playerKey=" . $playerKey;
         $a_encodear = array('target' => 'com.brightcove.experience.ExperienceRuntimeFacade.getDataForExperience', 'response' => '/1', 'data' => array('0' => 'd8cfa8b0ed0aee3f22dfede0f2e5874cb5b4af67', '1' => new SabreAMF_AMF3_Wrapper(new SabreAMF_TypedObject('com.brightcove.experience.ViewerExperienceRequest', array('TTLToken' => null, 'deliveryType' => NAN, 'URL' => $this->web, 'experienceId' => $experienceID, 'playerKey' => $playerKey, 'contentOverrides' => array('0' => new SabreAMF_TypedObject('com.brightcove.experience.ContentOverride', array('contentRefIds' => null, 'target' => 'videoPlayer', 'contentIds' => null, 'contentType' => 0, 'contentId' => $contentId, 'featuredRefId' => null, 'contentRefId' => null, 'featuredId' => NAN))))))));
         $post = brightcove_encode($a_encodear);
         //print_r(brightcove_decode($post));
         dbug('a descargar: ' . $messagebroker);
         $t = brightcove_curl_web($messagebroker, $post);
         $res_decoded = brightcove_decode($t);
         dbug('RESPUESTA BRIGHTCOVE:');
         dbug_r($res_decoded);
         /*
         view-source:http://c.brightcove.com/services/mobile/streaming/index/rendition.m3u8?assetId=3588406440001
         http://progresive.lavozdegalicia.es/BCOVE/VTV/pd/2728142669001/201405/3588406440001/2728142669001_3588406440001_s-1.ts?
         http://videohdvtv-vh.akamaihd.net/BCOVE/VTV/hd/2728142669001/201405/2728142669001_3588398678001_PRG-VAYAVT4-0032.mp4
         http://progresive.lavozdegalicia.es/BCOVE/VTV/hd/2728142669001/201405/2728142669001_3588398678001_PRG-VAYAVT4-0032.mp4
         */
         $base = $res_decoded['data']->getAMFData();
         $base = $base['programmedContent']['videoPlayer']->getAMFData();
         $base = $base['mediaDTO']->getAMFData();
         $obtenido['enlaces'] = brightcove_genera_obtenido($this, $base, array('IOSRenditions' => 'm3u8', 'renditions' => 'http'));
     }
     finalCadena($obtenido);
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:51,代码来源:vtelevision.php


示例14: calcula

 function calcula()
 {
     //title: "Matalobos quotAno 1 A familiaquot",
     $titulo = entre1y2($this->web_descargada, '<title>', '<');
     if (enString($titulo, ' |')) {
         $titulo = entre1y2($titulo, 0, ' |');
     }
     $titulo = limpiaTitulo($titulo);
     dbug('titulo=' . $titulo);
     if (enString($this->web_descargada, "id=\$(this).attr('id').split('|');")) {
         dbug('modo 1');
         preg_match("#url:.*?'(.*?)',#i", $this->web_descargada, $matches);
         dbug_r($matches);
         $url = $matches[1];
         if ($url[0] === '/') {
             $url = 'http://www.crtvg.es' . $url;
         } else {
             if ($url[0] !== 'h') {
                 $url = substr($this->web, 0, strrposF($this->web, '/')) . $url;
             }
         }
         dbug_r($url);
         preg_match_all("#<div class='cap' id='([0-9]+?)\\|([0-9]+?)'>#", $this->web_descargada, $matches);
         dbug_r($matches);
         $obtenido = array('titulo' => $titulo, 'imagen' => '/canales/tvg.jpg', 'enlaces' => array());
         for ($i = 0, $i_t = count($matches[0]); $i < $i_t; $i++) {
             $ret = CargaWebCurl($url, 'idSerie=' . $matches[1][$i] . '&idCapitulo=' . $matches[2][$i]);
             //dbug_($ret);
             $tit = entre1y2($ret, '<div id="titulo">', '</div');
             $tit = strip_tags($tit);
             $this->parsefragment($obtenido['enlaces'], $ret, $tit, true);
         }
     } else {
         dbug('modo 2');
         //backgroundImage: "url(http://www.crtvg.es/files/web/000020120911000003.jpg)"
         if (enString($this->web_descargada, 'backgroundImage:')) {
             $p = strpos($this->web_descargada, 'backgroundImage:');
             $imagen = entre1y2_a($this->web_descargada, $p, 'url(', ')');
         } else {
             $imagen = entre1y2($this->web_descargada, '"playlist":[{"url":"', '"');
             $imagen = str_replace('\\', '', $imagen);
         }
         dbug('imagen=' . $imagen);
         $obtenido = array('titulo' => $titulo, 'imagen' => $imagen, 'enlaces' => array());
         $this->parsefragment($obtenido['enlaces'], $this->web_descargada, $titulo);
     }
     finalCadena($obtenido);
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:48,代码来源:crtvg.php


示例15: soundcloud

function soundcloud()
{
    global $web;
    $client_id = "b45b1aa10f1ac2941910a7f0d10f8e28";
    $res = CargaWebCurl('https://api.sndcdn.com/search/sounds?facet=genre&limit=10&offset=0&linked_partitioning=1&client_id=' . $client_id . '&q=' . urlencode($web));
    $resultados = array('buscador' => 'soundcloud.com', 'enlaces' => array());
    $p1 = 0;
    for ($i = 0; $i < 10 && ($p1 = strpos($res, '"kind":"track"', $p1)); $i++) {
        //streamable?
        $p = strposF($res, '"streamable":', $p1);
        $f = strpos($res, ',', $p);
        $streamable = substr($res, $p, $f - $p);
        if ($streamable == "true") {
            //url
            $p = strposF($res, '"id":', $p1);
            $f = strpos($res, ",", $p);
            $modoUrl = "stream";
            $url = 'http://api.soundcloud.com/tracks/' . substr($res, $p, $f - $p) . '/' . $modoUrl . '?client_id=' . $client_id;
            //título
            $p = strposF($res, '"title":"', $p1);
            $f = strpos($res, '"', $p);
            $tit = utf8_encode(jsonRemoveUnicodeSequences(substr($res, $p, $f - $p)));
            //duración
            $p = strposF($res, '"duration":', $p1);
            $f = strpos($res, ',', $p);
            $duracion = (double) substr($res, $p, $f - $p) / 1000;
            $min = (int) ($duracion / 60);
            $seg = $duracion - $min * 60;
            $seg = substr($seg, 0, 2);
            while (enString($seg, ".")) {
                $seg = "0" . substr($seg, 0, 1);
            }
            $duracion = $min . ":" . $seg;
            //peso
            /*$p=strposF($res,'"original_content_size":',$p1);
            		$f=strpos($res,",",$p);
            		$tam=substr($res,$p,$f-$p);
            		$tam=((float)$tam)/1048576;
            		$tam=substr($tam,0,strpos($tam,".")+2);*/
            $r = array('url' => $url, 'titulo' => $tit, 'duracion' => $duracion, 'preview' => 1);
            $resultados['enlaces'][] = $r;
        }
        $p1++;
    }
    dbug_r($resultados);
    return $resultados;
}
开发者ID:sehcel,项目名称:Descargavideos,代码行数:47,代码来源:soundcloud.php


示例16: calcula

 function calcula()
 {
     $retfull = CargaWebCurlProxy($this->web, 'ESP');
     //titulo
     //<meta property="og:title" content="Alaska y Mario Episodio Extra - Pierrot"/>
     $p = strpos($retfull, 'og:title');
     $titulo = entre1y2_a($retfull, $p, 'content="', '"');
     $titulo = limpiaTitulo($titulo);
     dbug('titulo=' . $titulo);
     //imagen
     //<meta property="og:image" content="http://....jpg?height=106&amp;quality=0.91"/>
     $p = strpos($retfull, 'og:image');
     $imagen = entre1y2_a($retfull, $p, 'content="', '?');
     if (enString($imagen, 'mtvnimages.com')) {
         $imagen = $imagen . '?height=180&quality=1';
     } else {
         $imagen = substr($imagen, 0, strpos($imagen, '"'));
     }
     if ($imagen == '' || enString($imagen, '<')) {
         $imagen = entre1y2($retfull, 'rel="image_src" href="', '"');
     }
     dbug('imagen=' . $imagen);
     //vid:"786779",
     $id = entre1y2($retfull, 'vid:"', '"');
     dbug('id=' . $id);
     //http://intl.esperanto.mtvi.com/www/xml/media/mediaGen.jhtml?uri=mgid:uma:video:mtv.es:747606
     $url = 'http://intl.esperanto.mtvi.com/www/xml/media/mediaGen.jhtml?uri=mgid:uma:video:mtv.es:' . $id;
     dbug('url=' . $url);
     $ret = CargaWebCurlProxy($url, 'ESP');
     dbug($ret);
     //Por situación geográfica del servidor (supongo) da error. Usar pydowntv :(
     if (!enString($ret, 'copyright_error.flv')) {
         $extracto = entre1y2($ret, '<rendition', '<beacons>');
         dbug('extracto=' . $extracto);
         $p = strrposF($extracto, '<src>');
         $f = strpos($extracto, '<', $p);
         $url = substr($extracto, $p, $f - $p);
     } else {
         dbug('Usando pydowntv');
         $ret = CargaWebCurl('http://www.pydowntv.com/api?url=' . $this->web);
         dbug($ret);
         $url = entre1y2($ret, '"url_video": ["', '"');
     }
     $obtenido = array('titulo' => $titulo, 'imagen' => $imagen, 'enlaces' => array(array('url' => $url, 'rtmpdump' => '-r "' . $url . '" -o "' . generaNombreWindowsValido($titulo) . '.' . (enString($url, '.mp4') ? 'mp4' : 'flv') . '"', 'tipo' => 'rtmpConcreto')));
     finalCadena($obtenido);
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:46,代码来源:mtves.php


示例17: calcula

 function calcula()
 {
     if (!enString($this->web_descargada, '<Form method="POST" action=\'\'>')) {
         setErrorWebIntera('No se encuentra ningún vídeo');
         return;
     }
     $id = substr($this->web, strposF($this->web, 'played.to/'));
     dbug('id = ' . $id);
     $web_embedPlayedTo = 'http://played.to/embed-' . $id . '-640x360.html';
     //
     $retfull = CargaWebCurl($web_embedPlayedTo, '', array('referer' => 'http://web.com'));
     $imagen = entre1y2($retfull, 'image: "', '"');
     $titulo = entre1y2($this->web_descargada, '<h1 class="pagename">', '<');
     // FALLA EN EL CALLBACK DEL SWF. EDITAR EL SWF
     $urlJS = 'function lanzaPlayedTo(){' . 'if(typeof DESCARGADOR_ARCHIVOS_SWF === "undefined"){' . 'setTimeout(lanzaPlayedTo, 200)' . '}' . 'else if(DESCARGADOR_ARCHIVOS_SWF === true){' . 'getFlashMovie("descargador_archivos").CargaWeb({' . '"url":"' . $web_embedPlayedTo . '",' . '"metodo":"GET"' . '}, "procesaPlayedTo2");' . '}' . '}' . 'function procesaPlayedTo2(txt){' . 'var url = txt.split("file: \\"")[1].split("\\"")[0];' . 'mostrarResultado(url);' . '}' . 'function mostrarResultado(entrada){' . 'finalizar(entrada,"Descargar");' . '}' . 'function mostrarFallo(){' . 'finalizar("","No se ha encontrado ningún resultado");' . '}' . 'if(typeof descargador_archivos === "undefined"){' . 'D.g("enlaces").innerHTML += \'' . genera_swf_object('/util/fla/f/http://played.to/') . '\';' . 'var descargador_archivos = D.g("descargador_archivos");' . '}' . 'lanzaPlayedTo();';
     $obtenido = array('titulo' => $titulo, 'imagen' => $imagen, 'enlaces' => array(array('url' => $urlJS, 'tipo' => 'jsFlash')));
     finalCadena($obtenido);
 }
开发者ID:sehcel,项目名称:Descargavideos,代码行数:18,代码来源:playedto.php


示例18: calcula


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP enToPerNums函数代码示例发布时间:2022-05-15
下一篇:
PHP emptyArray函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap