danielpoulin
New member
In nowplaying.txt, is it possible to put the name of the artist and the abum, one below the other?
can we changed nowplaying.txt with html tag?
can we changed nowplaying.txt with html tag?
The format is currently fixed. If you're using this file on your web site, then it's better to switch to XML, parse it and display in the format you like.danielpoulin said:In nowplaying.txt, is it possible to put the name of the artist and the abum, one below the other?
can we changed nowplaying.txt with html tag?
It depends on how your web site is created. If you're using PHP - it has routines to parse XML data.danielpoulin said:how i can parse and display this?
I'm not sure if easy and quick solution exists for Wordpress. How are you displaying the title now?danielpoulin said:I got a wordpress website, can you show me an example to show "name of artist" and a "title of a song:?
<?php
$PLAYER = simplexml_load_file('nowplaying.xml');
foreach ($PLAYER->TRACK as $TRACK) {
echo "<font color=\"#000099\">Artiste =</font> <font color=\"#000000\">{$TRACK['ARTIST']} </font>
\n";
echo "<font color=\"#000099\">Titre =</font> <font color=\"#000000\">{$TRACK['TITLE']} </font>
\n";
}
?>
<?php
$PLAYER = simplexml_load_file('nowplaying.xml');
foreach ($PLAYER->TRACK as $TRACK) {
echo "<font color=\"#000099\">Artist =</font> <font color=\"#000000\">{$TRACK['ARTIST']} </font>
\n";
echo "<font color=\"#000099\">Title =</font> <font color=\"#000000\">{$TRACK['TITLE']} </font>
\n";
}
?>
<html>
<head>
<title>refresh the title</title>
<meta http-equiv="refresh" content="10">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<iframe src="title.php" allowtransparency="true" height="80" width="200" frameborder=0 marginheight=0 marginwidth=0 scrolling=yes></iframe>
</body>
</html>
<iframe src="http:your_website_adress_here/title.html" allowtransparency="true" height="100" width="300" frameborder=0 marginheight=0 marginwidth=0 scrolling=yes></iframe>