Base de connaissances
1 000 FAQ, 500 tutoriels et vidéos explicatives. Ici, il n'y a que des solutions !
Streaming audio: Webmediastats
Webmediastats / Web Radio Stats est supporté.
Actions Ă effectuer
Connectez-vous Ă votre Manager
Rendez-vous sous Broadcast -> Radio -> la radio correspondante -> bouton Configuration du flux concerné
Trouvez le Lien accès Webmediastats / Web Radio Stats
Copiez la ligne (p.ex http://statslive.infomaniak.com/mediastats.php?radio=nyancat-real.mp3&password=xxxxxx)
Créez un fichier PHP (p.ex client.php) et y copier le script suivant:
<code><?php $sUrl = "mon lien webmediastats"; $plaintext=""; $pass=md5("Tell me, O Muse, of the man of many devices, who wandered full many ways after he had sacked the sacred citadel of Troy. Many were the men whose cities he saw and whose mind he learned, aye, and many the woes he suffered in his heart upon the sea, seeking to win his own life and the return of his comrades. Yet even so he saved not his comrades, though he desired it sore, for through their own blind folly they perished--fools, who devoured the kine of Helios Hyperion; but he took from them the day of their returning. Of these things, goddess, daughter of Zeus, beginning where thou wilt, tell thou even unto us."); $plaintext = file_get_contents($sUrl); function EnDeCrypt($text, $password){ $sbox=array(); $key=array(); $i=0; $j=0; $cipher = ""; $intLength = strlen($password); for ($a=0;$a<=255;$a++){ $ctmp = substr($password,($a % $intLength), 1); $key[$a] = ord($ctmp); $sbox[$a] = $a; } $x = 0; for ($b = 0; $b<=255;$b++) { $x = ($x + $sbox[$b] + $key[$b])%256; $tempSwap = $sbox[$b]; $sbox[$b] = $sbox[$x]; $sbox[$x] = $tempSwap; } for ($a = 1;$a<=strlen($text);$a++) { $itmp = 0; $i = ($i + 1) % 256; $j = ($j + $sbox[$i]) % 256; $itmp = $sbox[$i]; $sbox[$i] = $sbox[$j]; $sbox[$j] = $itmp; $k = $sbox[($sbox[$i] + $sbox[$j]) % 256]; $ctmp = substr($text,($a - 1),1); $itmp = ord($ctmp); $cipherby = $itmp ^ $k; $cipher .= chr($cipherby); } return $cipher; } header("content-type:text/plain"); header("server:infomaniak-icecast"); $OutputEncryption=0; $OutputEncryption===1?$a=EnDecrypt($plaintext,$pass):$a=$plaintext; echo $a;?></code>A la première ligne du script ($sUrl = ....) remplacez "mon lien webmediastats" par l'URL copiée
Transférez le fichier du script sur le site de votre radio (qui doit être compatible PHP) par exemple dans un dossier "stats"
Si votre site se trouve chez Infomaniak veuillez modifier le fichier .htaccess à la racine de votre siteVérifiez que le script fonctionne en appelant l'URL dans le navigateur: (p.ex http://domaine.xyz/stats/client.php)
Contactez webmediastats en suivant les instructions Ă l'adresse http://www.webmediastats.com/. Vous pouvez leur communiquer l'URL et leur signaler que vous ĂŞtes client Infomaniak
En savoir plus
S'il y a plusieurs flux, il faut plusieurs scripts.
Lien vers cette FAQ: