You can't check the result from the Javascript in PHP, because the PHP code runs before the page is sent from the server, and the Javascript runs after the page has arrived to the browser.
Use Javascript to check the result from the script:
<script type="text/javascript">
if (StreamInformation.STREAMSTATUS() == "True") {
document.write("On Air");
} else {
document.write("Off Air");
}
</script>
Note: I assumed from the text in your question that the STREAMSTATUS
method returns the string "True"
when the server is live.