• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Current Listener Count  (Read 325 times)
admin
Administrator
Full Member
*****

Karma: +0/-0
Posts: 122



View Profile
« on: February 08, 2010, 08:54:39 PM »

You can use this code to display the current listener count of your stream on your website.
If you get a error, you may need to ask your web host to open your port - if you are hosting through us, just open a ticket.

Code:
<?php 
$open 
fsockopen("IP ADDRESS HERE","PORTHERE"); 
if (
$open) { 
fputs($open,"GET /7.html HTTP/1.1\nUser-Agent:Mozilla\n\n"); 
$read fread($open,1000); 
$text explode("content-type:text/html",$read); 
$text explode(",",$text[1]); 
} else { 
$er="Connection Refused!"; } 
?>


<?php
if ($text[1]==1) { $state "Up"; } else { $state "Down"; } 
if (
$er) { echo $er; exit; } 
echo 
"<font face=verdana size=1>
</font>"
;?>

 <?php 
$real 
$text[0];
echo 
$real;
?>
« Last Edit: February 08, 2010, 08:56:41 PM by admin » Logged

Pages: [1]
Print
Jump to: