1
Hello, I would like to know how to get videos from the code embed
from UOL player videos and by to work on Jwplayer. I found the code below, he in the case catches the url
and converts with everything like url
of UOL. Changed guidelines, but it’s not working. Someone could help me with this.
To url of video UOL.
The code to convert url
:
<?php
//----------------------------------------------------------------------------
// FUNÇÃO CURL PARA URL FILE DISABLE - SIMPLE XML LOAD
//----------------------------------------------------------------------------
function curlXML($url) {
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 0);
$data = curl_exec($ch);
curl_close($ch);
$xml = new SimpleXMLElement($data);
return $xml;
}
// Verifico se existe no servidor a função curl.
function carrega_xml ($url) {
if (ini_get('allow_url_fopen')){
$xml = simplexml_load_file($url);
} else {
$xml = $this->curlXML($url);
}
return $xml;
}
$video = carrega_xml('http://videolog.uol.com.br/swfs/related/related-player-publicididade.php?id_video='.$_GET['v']);
echo $video->item->video;
if ($video->item->video_hd){
echo $video->item->video_hd;
}
?>
In this case, the above code also generates download link, but only need it to work with the url
current. I thank anyone who can help me.
"Would anyone know to tell me any alternative way to get the url
of the UOL videos, but to be able to put in Jwplayer, if there is no solution for the functioning of this code".
Does anyone know how to do that ?
– Striffer