Diese Struktur muss ich als XML raushaben..so solls aussehen..
<rss version="2.0"
xmlns:media="https://search.yahoo.com/mrss"
xmlns:atom="https://www.w3.org/2005/Atom">
<item>
<title>website - video title</title>
<link>https://www.website.com/</link>
<description>nice video title</description>
<media:thumbnail url="videos/video123.jpg"/>
<media:content type="video/x-flv" url="videos/video123.flv"/>
</item>
Ein teil meines PHP scripts das bestimmt was angezeigt werden soll..
Code: Alles auswählen
$xml = "\t<url>\n";
$xml .=
"\t\t<loc>http://".$_SERVER['SERVER_NAME']."/watch/".$row['vi
deo_id']."/".$video_title_url."/</loc>\n";
$xml .= "\t\t<video:video>\n";
$xml .=
"\t\t\t<video:content_loc>".$row['video_server_url'].$videos_folder.$thi
s->getImageName($row['video_id']).'.flv'."</video:content_loc>\n";
//$xml .= "\t\t\t<video:player_loc
allow_embed=\"yes\"></video:player_loc>\n";
$xml .=
"\t\t\t<video:title>".$row['video_title']."</video:title>\n";
$xml .=
"\t\t\t<video:description>".$row['video_caption']."</video:description>\
n";
$xml .=
"\t\t\t<video:thumbnail_loc>".$row['video_server_url'].$thumbnail_folder
.$this->getImageName($row['video_id']).$CFG['admin']['videos']['thumb_na
me'].'.'.$CFG['video']['image']['extensions']."</video:thumbnail_loc>\n"
;
$xml .= "\t\t</video:video>\n";
$xml .= "\t</url>\n";
return $xml;
Wie kann ich am elegantesten diesen code ändern ?