Foros del Web » Creando para Internet » Sistemas de gestión de contenidos »

Problema crossdomain.xml de Radio.Blog

Estas en el tema de Problema crossdomain.xml de Radio.Blog en el foro de Sistemas de gestión de contenidos en Foros del Web. No sabía muy bien donde poner esto, si no va aquí, por favor, que algún mod lo mueva. Pues veréis, ya desde hace tiempo, no ...
  #1 (permalink)  
Antiguo 11/01/2010, 06:35
 
Fecha de Ingreso: enero-2008
Mensajes: 18
Antigüedad: 16 años, 3 meses
Puntos: 0
Problema crossdomain.xml de Radio.Blog

No sabía muy bien donde poner esto, si no va aquí, por favor, que algún mod lo mueva.

Pues veréis, ya desde hace tiempo, no dan soporte al Radioblog, por lo cual, no puedo poner esta duda en su foro (lo borraron) la versión que yo tengo, la 3.1.8 siempre me ha ido bien, no he tenido problemas, pero este pasado mes de septiembre, volví a comprar otro host (en el mismo hosting, donde tenía las anteriores webs). Tras mucho investigar, me di cuenta, que antes de que se terminara la validez de mi antiguo host, en él, iba perfecto el radioblog, sin embargo, en el nuevo, sólo se ve el sking, pero no las canciones...

Mirando por muchas webs, he llegado a la conclusión, de que se trata de la versión php del host, ya que el nuevo tiene la versión 5.2.12, y el antiguo, tenia una versión muy inferior.

El problema, creo que es del archivo crossdomain.xml, ya que, según he leído por ahí, ayuda a crear archivos xml mediante php 5.


Os dejo el código del crossdomain.xml:
Código:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
   <site-control permitted-cross-domain-policies="master-only" />
   <allow-access-from domain="*" />
   <allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>

Y también os dejo el código del playlist:
Código PHP:
<?php

/***********************************************************************
 * PLAYLIST CONFIGURATION
 * Please don't use " (double quotes) or backslash them (like this: \").
 ***********************************************************************/

$author "";
$author_email "";
$author_website "";
$playlist_img "";
$title "";
$description "";
$cover_url "http://cover.radioblogclub.com/?t=";
$buy_url "http://store.radioblogclub.com/";
$allow_access_from_domain "*";



/***********************************************************************
 * URL OF THE SOUND DIRECTORY
 * If your web hosting does not provide a valid SERVER_NAME 
 * you may overide it here.
 ***********************************************************************/

$web_path 'http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']);



/***********************************************************************
 * DON'T TOUCH THIS
 * radio.blog.playlist.3.0
 * 23.03.2007
 * www.radioblogclub.com
 ***********************************************************************/

// INIT
$oPlaylist = new Playlist();
$oPlaylist->file_path dirname(__FILE__);

// EXTENSIONS
$fileExt[] = 'mp3';
$fileExt[] = 'rbs';
$fileExt[] = 'swf';
$fileExt[] = 'rbv';
$fileExt[] = 'flv';

// GET SOUNDS
$oPlaylist->getSounds();

// XML HEADER
header("Content-Type: text/xml; charset=utf-8");
echo 
"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
if(!
$_GET['noxsl']) echo "<?xml-stylesheet href=\"template.xsl\" type=\"text/xsl\"?>\n";

// DISPLAY PLAYLIST IN XML
print_nl('<playlists');
print_nl('author= "'.htmlentities($author).'"');
print_nl('author_email="'.htmlentities($author_email).'"'); 
print_nl('author_website="'.htmlentities($author_website).'"');
print_nl('playlist_img="'.htmlentities($playlist_img).'"');
print_nl('title="'.htmlentities($title).'"');
print_nl('description="'.htmlentities($description).'"');
print_nl('cover_url="'.htmlentities($cover_url).'"'); 
print_nl('buy_url="'.htmlentities($buy_url).'"'); 
print_nl('allow_access_from_domain="'.htmlentities($allow_access_from_domain).'"');
print_nl('>');
$oPlaylist->displayPlaylistXML();
print_nl('</playlists>');


/***********************************************************************
 * PLAYLIST FUNCTIONS
 ***********************************************************************/

// PLAYLIST CLASS
class Playlist {

    function 
Playlist() {
        
    }

    
// GET SOUNDS
    
function getSounds() {
        global 
$fileExt;
        
$this->sounds browseFile($this->file_path.'/'$fileExt1);
        
krsort($this->sounds);
    }
    
    
// DISPLAY PLAYLIST IN XML
    
function displayPlaylistXML() {
        global 
$fileExt,$web_path;

        if (
count($this->sounds) > 0) {
            
$playlistNode '';
            
            foreach(
$this->sounds as $key=>$value) {
                
$trackMod $key;
                
$trackExt findExt($value,$fileExt);
                
$trackType 'audio';
                if (
$trackExt == 'flv' || $trackExt == 'rbv'$trackType 'video';
                
$trackName utf8(basename($value'.'.$trackExt));
                
$playlist utf8(basename(dirname($value)));
                
$path utf8($web_path.str_replace($this->file_path''dirname($value)).'/'.rawurlencode(basename($value)));
    
                
$track[$playlist][] = '<track trackMod="'.$trackMod.'" type="'.$trackType.'" title="'.$trackName.'" path="'.$path.'" />';
            }
            
            foreach(
$track as $playlist=>$tracks) {
                
print_nl('<playlist title="'.$playlist.'">');
                foreach(
$tracks as $value) {
                    
print_nl($value);
                }
                
print_nl('</playlist>');
            }
        }
    }
}

// BROWSE FILE
function browseFile($src_dir$match '.'$recursive 0) {
    
    
$d dir(realpath($src_dir));
    
$files = array();
    while(
$file $d->read()) {

        if (
$file == '.' || $file == '..') continue;

        
// DIR
        
if ( is_dir("$src_dir$file/") ) {
            if (
$recursive == 1) {
                
$files $files browseFile("$src_dir$file/"$match$recursive); // RECURSIVE PART
            
}
        }

        
// FILE
        
if ( findExt($file,$match) ) {
            
$filemod filemtime($src_dir.$file);
            while( isset(
$files[$filemod]) ) $filemod++; 
            
$files[$filemod] = $src_dir.$file;
        }
    }

    
$d->close();
    return 
$files;
}

// CONVERT TO UTF8
function utf8($string) {
    
$out utf8_encode(str_replace("&","&amp;",$string));
    return 
$out;
}

// PRINT + NEW-LINE
function print_nl($string) {
    print(
$string)."\n";
}

// FIND EXT
function findExt($filename$ext) {
    if (!
is_array($ext)) $ext = array($ext); 
    
$arrayFile explode('.',$filename);
    if (!
in_array(end($arrayFile),$ext)) return false;
    return 
end($arrayFile);
}

?>
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:44.