Codice PHP:
//includiamo il file caricato in txt
//per comidità ho ipotizzato che il file si trovasse nella stessa directory
$fileName = "http://xxxxx.xxx/canzoni.txt";
//una volta incluso andrò a leggere da quante righe è composto per creare l'elenco da cui il visitatore sceglierà il brano
//stamperò a video, e creerò un collegamento href per l'invio della richiesta
$fileData = @file($fileName);
if ($fileData != false) {
foreach($fileData as $line_num => $brano) {
$song = explode(" * ", $brano);
str_replace(" ", "_", $song[0]);
str_replace(" ", "_", $song[1]);
echo "<li class=\"aligned-middle\" style=\"display: list-item;\">
<a href=\"".$song[0]."/".$song[1]."\" >
<img src=\"".$song[0]."/".$song[1]."/img.jpg\" class=\"img-link\" width=\"50\" height=\"50\" border=\"0\" alt=".$song[1]." title=".$song[1].">
</a>
<div class=\"text\">
<a href=\"".$song[0]."/".$song[1]."\" >
[b]
<strong class=\"ttl\"> ".$song[0]." [/b] </br>
[/b] ".$song[1]."
</a>
</div>
\n";
}
}