Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Closed Thread
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-01-2012, 02:48 PM   PM User | #1
Bonzai
New Coder

 
Join Date: Sep 2009
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Bonzai is an unknown quantity at this point
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>";
?>
Bonzai is offline  
Old 12-01-2012, 04:35 PM   PM User | #2
vinyl-junkie
$object->toCD-R(LP);


 
vinyl-junkie's Avatar
 
Join Date: Jun 2003
Posts: 3,053
Thanks: 2
Thanked 22 Times in 22 Posts
vinyl-junkie is on a distinguished road
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!
vinyl-junkie is offline  
Old 12-01-2012, 04:37 PM   PM User | #3
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
This appears a duplicate as found here
Fou-Lu is offline  
Closed Thread

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:08 AM.


Advertisement
Log in to turn off these ads.