Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP (Icecast) - How do I display the whole song name?
    text
    copied!<p>Right now I am running a radio server and I set up a WordPress blog for it.</p> <p>I made it auto refresh the widget by including it in an iframe that auto refreshes every 10 seconds.</p> <p>However, I have a programming issue. Whenever it has a "-" in the song name ($artist[2]), it automatically puts it into the next one ($artist[3])</p> <p>Here is my code for the php file: http://fonts.googleapis.com/css?family=Merriweather+Sans:400,700' rel='stylesheet' type='text/css'> p { font-family: 'Merriweather Sans', sans-serif; font-weight: 400; } b { font-family: 'Merriweather Sans', sans-serif; font-weight: 700; } </p> <pre><code>&lt;?php header("Refresh: 10")&gt; //Display IceCast Server Stats $server = "direct.x86cam.com"; //IP (x.x.x.x or domain name) $iceport = "8000"; //Port $iceurl = "stream.mp3"; //Mountpoint $online = "&lt;font color=green&gt;&lt;b&gt;ONLINE&lt;/b&gt; &lt;/font&gt;&lt;br /&gt;"; $offline = "&lt;font color=red&gt;&lt;b&gt;OFFLINE&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;"; if($fp = @fsockopen($server, $iceport, $errno, $errstr, '1')) { fclose($fp); $ice_status=$online; echo "&lt;p&gt;&lt;b&gt;Stream Status:&lt;/b&gt; $ice_status"; $stats = file("http://" . $server . ":" . $iceport . "/status2.xsl"); $status = explode(",", $stats[5]); $artist = explode("-", $status[5]); echo "&lt;b&gt;Artist:&lt;/b&gt; " . $artist[1]; echo "&lt;b&gt;Song:&lt;/b&gt; " . $artist[2]; echo "&lt;br /&gt;"; echo "&lt;b&gt;Listeners:&lt;/b&gt; &lt;b&gt; " . $status[3] . "&lt;/b&gt;"; echo "&lt;/p&gt;"; //echo "&lt;br /&gt;"; //echo "&lt;p&gt;&lt;a href=http://" . $server . ":" . $iceport . "/" . $iceurl . " target=new&gt;&lt;b&gt;Listen!&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;"; } else { $ice_status=$offline; echo "&lt;p&gt;&lt;b&gt;Stream Status:&lt;/b&gt; $ice_status"; } ?&gt; &lt;hr /&gt; &lt;/center&gt; </code></pre> <p>Can anyone please explain how I could fix this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload