Javascript and PHP

fringradio

New Member
Anyone know how to use the the output of the javascipt snippets in PHP scripts? for example the one that has the Server status if it comes back Online echo X if Offflie echo Y etc

Cheers,

Fring

EDIT: My source status says Off-line but I'm streaming :S
 
Last edited:

Support

Level 1 Support
Staff member
Hi Fring. Rather than referencing the javascript for info you might be better off parsing the shoutcast server direct like in your php code you posted :

http://forum.internet-radio.org.uk/support/36-some-shoutcast-php-code.html

Essentially thats all the javascript is doing to gain its info.

The source status showing offline is probably because you are streaming using a remote source so the local auto DJ source is the one thsta offline.

Hope this helps.
 

fringradio

New Member
Hi Fring. Rather than referencing the javascript for info you might be better off parsing the shoutcast server direct like in your php code you posted :

http://forum.internet-radio.org.uk/support/36-some-shoutcast-php-code.html

Essentially thats all the javascript is doing to gain its info.

Ah well! :rofl: Was worth a try.

The source status showing offline is probably because you are streaming using a remote source so the local auto DJ source is the one thsta offline.

Hope this helps.

How can I make it react to a remote server?
 

fringradio

New Member
Anything on this:

Originally Posted by Support

The source status showing offline is probably because you are streaming using a remote source so the local auto DJ source is the one thsta offline.

Hope this helps.
How can I make it react to a remote server?
 

Support

Level 1 Support
Staff member
Hi Fring. We have noted this as a feature request for a future upgrade. As it stands you should use some of your php code that interfaces with the stream to detect its live status.
 
Top