Bonjour

Je me permet de vous ecrire car apres bon nombre de recherche sans resultat je voulez savoir comment afficher le nombre d'auditeur qui ecoute actuellement la radio hors pour le moment j'ai trouver ce code

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
 
// Edit the next two lines with your server information
$host = "IP";
$port = "PORT";
 
// Connect to server
$fp=@fsockopen($host,$port,&$errno,&$errstr,10);
if (!$fp) {
echo "Unable to connect to server";
} else {
 
// Get data from server
fputs($fp,"GET /7 HTTP/1.1\nUser-Agent:Mozilla\n\n");
 
// exit if connection broken
for($i=0; $i<1; $i++) {
if(feof($fp)) break;
$fp_data=fread($fp,31337);
usleep(500000);
}
 
// Strip useless junk from source data
$fp_data=ereg_replace("^.*<body>","",$fp_data);
$fp_data=ereg_replace("</body>.*","",$fp_data);
 
// Place values from source into variable names
list($current,$status,$peak,$max,$reported,$bit,$song) = explode(",", $fp_data, 7);
 
if ($status == "1") {
// To use any of the outputs below just uncomment (remove the double forward slashes) that line.
// Below is an example of all data available in the 7.html file made by the Shoutcast server
// **ON BY DEFAULT - COMMENT OUT (put to forwards slashes in front of it) TO HIDE
 
echo "<html>\n<head>\n<title></title>\n</head>\n<body>\nCurrent Listeners: $current<br>\nServer Status: $status<br>\nMaximum Listener: $max<br>\nBroadcast Bitrate: $bit<br>$genre<br>$puplic\nCurrent Song: $song\n<br><br><a href=\"java script:location.reload()\"><b>Cliquez ici pour actualiser les
informations</b></a></body>\n</html>";
// Below is a basic one line value of the current song, perfect for front pages of sites
//echo "<html>\n<head>\n<title></title>\n</head>\n<body>\nCurrently Playing: <a href=\"http://$host:$port/listen.pls\">$song</a>\r\n</body>\n</html>";
 
} else {
echo "The radio station is currently down";
} }
 
?>
pour le moment il maffiche ceci :

on line 15
Current Listeners: 2
Server Status: 1
Maximum Listener: 500
Broadcast Bitrate: 80

Current Song: javi reina ladis-i cant stop

Cliquez ici pour actualiser les informations

Avec de belle erreur telle que celle la :
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/Dinastie/www/include/nbre_auditeur.php on line 15
tous en sachant que la ligne 15 ==>> $fp=@fsockopen($host,$port,&$errno,&$errstr,10);

Moi je voudrai simplement qui me dit combien de personne ecoute la radio car ma page rafraichie tous les 120seconde donc comment faire svp merci de m'aide car la je ne ses vraiment plus quoi faire