Hello, I would like to know how I can get videos from the embed
code of the UOL videos player and to work on JWPlayer . I found the code below, it in the case gets the url
and converts with everything as url
of UOL. Changed guidelines, but not working. Could someone help me with this.
The url of the 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 the case, the above code also generates download link, but only needs it to work with the current url
. Thank you in advance for your help.
" Someone could tell me some alternative way to get url
of UOL videos, but to be able to put it in JWPlayer, if there is no solution to the operation of this code