Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2009
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Need Help With Display

    hey guys i need help


    in get this on php web site :

    J?nnif?r Lop?z - Papi

    but it need's to be:

    Jénifèr lopéz - Papi


    for test i put é è


    here the code from php site:





    <?php
    // @----------------------------------------------------------------------@
    // | PHP ONAIR 1.0 |
    // @----------------------------------------------------------------------@
    // | Copyright © 2012 Olivier Noël , South Music Luxembourg a.s.b.l. |
    // @----------------------------------------------------------------------@
    // | Author: Olivier Noël <stilnoct@me.com> |
    // @----------------------------------------------------------------------@
    //
    // ONAIR.php Version 1.0 30/11/2012
    // @----------------------------------------------------------------------@
    // | READ INSTALLATION INSTRUCTIONS BEFORE |
    // | ask it <stilnoct@me.com> |
    // @----------------------------------------------------------------------@
    function saveChildren($element)
    {
    global $elements;
    foreach($element->children() as $child)
    {
    $elements[$child->getName()] = $child;
    saveChildren($child);
    }
    }
    function getAttribute($element, $attr)
    {
    foreach ($element->attributes() AS $key => $attribute)
    {
    if ($key == $attr) return $attribute;
    }
    }
    global $elements;
    // @----------------------------------------------------------------------@
    // | NOW ON AIR XML phath |
    // @----------------------------------------------------------------------@
    if (file_exists("onair/NowOnAir.xml"))
    {
    $xmlstring = utf8_decode(file_get_contents("onair/NowOnAir.xml"));
    $xmlstring = str_replace("&", "and", $xmlstring);
    $xml = simplexml_load_string($xmlstring);

    saveChildren($xml);

    foreach ($elements AS $key => $elmnt)
    {
    switch ($key)
    {
    case "Song":
    $actsongtitle = getAttribute($elmnt, "title");
    break;

    case "Artist":
    $actartistname = getAttribute($elmnt, "name");
    break;
    }
    }
    $act_onair = true;
    }
    if ($act_onair === true)
    {
    $act_string = $actartistname." - ".$actsongtitle;
    if ($songs[0] != $act_string)
    {
    $txt = $act_string."\n";
    {
    }
    }
    }
    // @----------------------------------------------------------------------@
    // | HERE YOU CAN CHANGE THE TEXT : NOW ON AIR |
    // | COLOR STYLE ETC |
    // @----------------------------------------------------------------------@
    echo "
    <html>
    <head>
    <meta http-equiv='refresh' content='30'>
    </head>
    <body style='background-color:transparent;';>
    <div style='font-size:11; color:#AAAAAA; font-family:Verdana,Arial;'>";
    echo "<span style='font-weight:slim; color:#EC7906;'>NOW ON AIR :</span><br>".htmlentities($act_string);
    // @----------------------------------------------------------------------@
    // | NEXT ON AIR XML phath |
    // @----------------------------------------------------------------------@
    if (file_exists("onair/AirPlayNext.xml"))
    {
    $xmlstring = utf8_decode(file_get_contents("onair/AirPlayNext.xml"));
    $xmlstring = str_replace("&", "and", $xmlstring);
    $xml = simplexml_load_string($xmlstring);

    saveChildren($xml);

    foreach ($elements AS $key => $elmnt)
    {
    switch ($key)
    {
    case "Song":
    $actsongtitle = getAttribute($elmnt, "title");
    break;

    case "Artist":
    $actartistname = getAttribute($elmnt, "name");
    break;
    }
    }
    $act_onair = true;
    }

    $t = file_get_contents("onair/last5.txt");
    $songs = explode("\n", $t);

    if ($act_onair === true)
    {
    $act_string = $actartistname." - ".$actsongtitle;
    if ($songs[0] != $act_string)
    {
    $txt = $act_string."\n";
    // @----------------------------------------------------------------------@
    // | LAST PLAYED "for ($i=0; $i<1; $i++) = 1 SONG , 2 = 2 SONGS |
    // @----------------------------------------------------------------------@
    for ($i=-0; $i<7; $i++)
    {
    if ($songs[$i] != "") $txt .= $songs[$i]."\n";
    }
    file_put_contents("onair/last5.txt", $txt);
    $t = file_get_contents("onair/last5.txt");
    $songs = explode("\n", $t);
    }
    }

    // @----------------------------------------------------------------------@
    // | HERE YOU CAN CHANGE THE TEXT : NEXT ON AIR , LAST 6 PLAYED |
    // | COLOR STYLE ETC |
    // @----------------------------------------------------------------------@

    echo "
    <html>
    <head>
    <meta http-equiv='refresh' content='15'>
    </head>
    <body style='background-color:transparent;';>
    <div style='font-size:11; color:#AAAAAA; font-family:Verdana,Arial;'>";
    echo "<br><span style='font-weight:slim; color:#EC7906;'>COMING UP :</span><br>".htmlentities($act_string);
    echo "<br><br><span style='font-weight:slim; color:#EC7906;'>LAST PLAYED :</span><br>";
    $c = count($songs);
    for ($i=2; $i<$c; $i++) echo htmlentities($songs[$i])."<br>";
    // @----------------------------------------------------------------------@
    // | YOU ARE NOT PERMITTED TO REMOVE, CHANGE OR DELETE THE NEXT FILES |
    // @----------------------------------------------------------------------@
    echo "</div>";
    echo "
    <div>";
    echo "<span style='font-weight:smal; font-size:11; font-family:Verdana,Arial;'color:#EC7906;'></span><br>";
    ?>

  • #2
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,082
    Thanks
    2
    Thanked 23 Times in 23 Posts
    Moderator Note: This post was moved to its own thread. I have no idea what an appropriate title should be.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    This appears a duplicate as found here


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •