|
|
#1 | |
|
Junior Member
Join Date: Jun 2006
Location: Sweden
Posts: 17
|
Question about "Current song"
I´m trying to show a custom message when there isn´t any current song (server is down), but it doesn´t seem to work.
Here is the code: PHP Code:
Quote:
|
|
|
|
|
|
|
#2 |
|
Forum King
|
I did some tests. The 7th element (the song name, index 6) doesn't go blank when the source is disconnected. You have to use the status from the 2nd element (server status, index 1) to determine that. I have updated the code below:
PHP Code:
Oops, recheck the code, inversed the logic on the server status test by mistake. You probably should drop 7.html though and focus on grabbing the stats from the xml data instead. The new DNAS2 does not have 7.html |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2006
Location: Sweden
Posts: 17
|
The page loads for a long time, before it says "Anslutningen nekades!". (Connection refused).
Is there a way to optimize/speed up this? |
|
|
|
|
|
#4 | |
|
Forum King
|
Quote:
http://www.php.net/manual/en/functio...et-timeout.php PHP Code:
Last edited by thinktink; 6th October 2010 at 18:37. Reason: Tested on live server, re-edited to satisfy warnings. |
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jun 2006
Location: Sweden
Posts: 17
|
That worked beautifully.
Thanks mate...
|
|
|
|
|
|
#6 |
|
Forum King
|
You're welcome.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|