View previous topic :: View next topic |
Author |
Message |
jcr Modérateur français
Joined: 14 Apr 2006 Posts: 544 Location: France, Auvergne
|
Posted: Sat May 10, 2008 6:29 pm Post subject: |
|
|
Code: |
<icecast>
<limits>
<clients>20</clients>
<sources>2</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<burst-on-connect>1</burst-on-connect>
<burst-size>65535</burst-size>
</limits>
<authentication>
<!-- Sources log in with username 'source' -->
<source-password>******</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>*******</relay-password>
<!-- Admin logs in with the username given below -->
<admin-user>*****</admin-user>
<admin-password>*******</admin-password>
</authentication>
<!-- This is the hostname other people will use to connect to your server.
It affects mainly the urls generated by Icecast for playlists and yp
listings.-->
<hostname>PowaServ</hostname>
<!-- You may have multiple <listener> elements -->
<listen-socket>
<port>8000</port>
</listen-socket>
<mount>
<mount-name>/powaserv</mount-name>
<authentication type="htpasswd">
<option name="filename" value="authedusers"/>
<option name="allow_duplicate_users" value="0"/>
</authentication>
</mount>
<mount>
<mount-name>/powaserv.m3u</mount-name>
<username>test</username>
<password>test</password>
<authentication type="htpasswd">
<option name="filename" value="authedusers"/>
<option name="allow_duplicate_users" value="0"/>
</authentication>
</mount>
<fileserve>1</fileserve>
<paths>
<!-- basedir is only used if chroot is enabled -->
<basedir>/usr/share/icecast2</basedir>
<!-- Note that if <chroot> is turned on below, these paths must both
be relative to the new root, not the original root -->
<logdir>/var/log/icecast2</logdir>
<webroot>/usr/share/icecast2/web</webroot>
<adminroot>/usr/share/icecast2/admin</adminroot>
<alias source="/" dest="/status.xsl"/>
</paths>
<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<!-- <playlistlog>playlist.log</playlistlog> -->
<loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->
<!-- If logarchive is enabled (1), then when logsize is reached
the logfile will be moved to [error|access|playlist].log.DATESTAMP,
otherwise it will be moved to [error|access|playlist].log.old.
Default is non-archive mode (i.e. overwrite)
-->
<!-- <logarchive>1</logarchive> -->
</logging>
<security>
<chroot>0</chroot>
</security>
</icecast>
|
C'est bien ce dont je me doutais, tu n'utilises pas un éditeur à coloration syntaxique, genre kwrite pour éditer tes XML. Résultat des balises pas correctes, là, un commentaire ouvert et pas fermé.
Compares ton original avec la version corrigée et tu devrais trouver facilement _________________ Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Sat May 10, 2008 9:53 pm Post subject: |
|
|
Ha bin là ça fonctionne sous icecast, cool merci.
Mais j'ai la coloration des syntaxe et après t'avoir mis le fichier j'ai vue une erreur , mais bon il n'y en avait pas qu'une ....je suis une bille.
Bon par contre hé, ouai on dirais que avec moi y à toujours des soucis lool.
Je sais pas si cela vient de mon pc , mais quand je veut lire le lien de la page que j'ai faite , il me demande toujours le login et mdp.
http://powaserv.info/test/test.php
Hé rien a faire , je rentre le login et mdp et rebelotte à chaque fois....
ps : j'ai laisser le login et mdp test pour tester. |
|
Back to top |
|
|
jcr Modérateur français
Joined: 14 Apr 2006 Posts: 544 Location: France, Auvergne
|
Posted: Sat May 10, 2008 10:32 pm Post subject: |
|
|
Tu as du faire une petite gaffe quelque part encore _________________ Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Mon May 12, 2008 3:47 pm Post subject: |
|
|
Salut,
Hmm je ne pense pas avoir fait de connerie .
J'ai pris ton fichier et je les collé à la place du mien et voilà.
Donc là je vois pas trop.
Enfin c'est pas trop grave.
J'ai tester aussi idjc , franchement c'est bien , mais alors quesque ça pompe en ressource.
Un truc de malade.
Je vais rester sous mpd et voir les différents clients. |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Tue May 13, 2008 4:29 pm Post subject: |
|
|
Bonjour,
Une petite question sur icecast2.
Et il possible d'avoir une autre extension comme .ogg à la place du .m3u?
Connaissez vous sinon aussi un lecteur pour ajouter à une page web ?
Merci |
|
Back to top |
|
|
Cardiotek
Joined: 18 Feb 2009 Posts: 2
|
Posted: Wed Feb 18, 2009 7:17 pm Post subject: |
|
|
jcr wrote: |
Code: |
<div>
<center><br>
<?php
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$radioname = getParam( 'RadioStation' ) ;
$host = getParam( 'RadioHost' ) ;
$port = getParam( 'RadioPort' ) ;
$pic = getParam( 'RadioInfo' ) ;
$radioConnect = getParam( 'RadioStreamURI' ) ;
/**
* Lab Radio
*/
$msg = http_get( "http://$host:$port/getradiostatus.xsl" ) ;
$spl = explode( '<pre>', $msg ) ;
$spl = str_replace( '</pre>', '', $spl[1] ) ;
$spl = explode( "<br/>", $spl ) ;
$flds = $spl[0] ;
$spl = explode( "\n", $flds ) ;
array_shift( $spl ) ;
$stations = array() ;
foreach ( $spl as $e ) {
if ( ( $e !== '_END_' ) && !empty( $e ) ) {
$p = explode( '|', $e ) ;
$stations[$p[0]]['Name'] = $p[1] ;
$stations[$p[0]]['Description'] = $p[2] ;
$stations[$p[0]]['Listeners'] = $p[9] ;
$stations[$p[0]]['Peak'] = $p[10] ;
$stations[$p[0]]['Artist'] = $p[14] ;
$stations[$p[0]]['Title'] = $p[13] ;
}
}
$curtitle = $stations['/jrplay']['Title'] ;
$curartist = $stations['/jrplay']['Artist'] ;
$listeners = $stations['/jrplay']['Listeners'] ;
$peak = $stations['/jrplay']['Peak'] ;
$stream = 'DJ Robot' ;
echo '<a href="' . $radioConnect .'">' . $pic . '</a><br />' . "\n" ;
if ( !empty( $stations['/jrlive']['Name'] ) ) {
$curtitle = $stations['/jrlive']['Title'] ;
$curartist = $stations['/jrlive']['Artist'] ;
$listeners = $stations['/jrlive']['Listeners'] ;
$peak = $stations['/jrlive']['Peak'] ;
$stream = str_replace( 'on FlyDance', '', $stations['/jrlive']['Name'] ) ;
}
$curtitle = str_replace( '_', '', $curtitle ) ;
$curartist = str_replace( '_', '', $curartist ) ;
echo '<font size="+1"><strong>' . $listeners .'</strong></font> (' . $peak . ') auditeurs écoutent<br />' ;
echo "DJ: <strong>$stream</strong><br />" ;
echo "$curartist<br />" ;
?>
</center> <br/>
</div> |
pour le module PHP dans Joomal
et:
Code: |
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
<xsl:template match = "/icestats" >
<pre>
MountPoint,Server Name,Description,Data Type,Bitrate,Quality,Video Quality,Frame Size,Frame Rate,Listeners,Peak Listeners,Genre,Server URL,Artist,Title
<xsl:for-each select="source">
<xsl:value-of select="@mount" />|<xsl:value-of select="server_name" />|<xsl:value-of select="server_description" />|<xsl:value-of select="server_type" />|<xsl:value-of select="bitrate" />|<xsl:value-of select="quality" />|<xsl:value-of select="video_quality" />|<xsl:value-of select="frame_size" />|<xsl:value-of select="frame_rate" />|<xsl:value-of select="listeners" />|<xsl:value-of select="listener_peak" />|<xsl:value-of select="genre" />|<xsl:value-of select="server_url" />|<xsl:value-of select="artist" />|<xsl:value-of select="title" />
_END_
</xsl:for-each>
</pre>
</xsl:template>
</xsl:stylesheet>
|
pour le script getradiostatus.xsl à mettre dans le répertoire web de icecast |
Bonjour a tous, je vous fais part de mon probleme.
Je souhaite utiliser le script ci dessus, mais mon serveur est sous windows, c'est un serveur dédié qui me sert a d'autres choses et je ne peux passer par linux.
il m'apparait donc l'erreur suivante : Fatal error: Call to undefined function: http_get() in /homez.110/*******/www/radio.php on line 12
quelqu'un aurait il une solution pour faire tourner ce script sous windows ??
Merci |
|
Back to top |
|
|
jcr Modérateur français
Joined: 14 Apr 2006 Posts: 544 Location: France, Auvergne
|
Posted: Wed Feb 18, 2009 8:10 pm Post subject: |
|
|
http_get() n'est pas une fonction linux, mais provient d'une extension PHP disponible sur le site pecl.php.net
C'est une méthode plus simple que l'ouverture de sockets pour aller lire une URL.
Mais cette fonction peut être remplacée par des allels curl ou sockets. _________________ Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting |
|
Back to top |
|
|
Cardiotek
Joined: 18 Feb 2009 Posts: 2
|
Posted: Fri Feb 20, 2009 1:08 pm Post subject: |
|
|
C'est une très bonne chose que ce ne soit pas une fonction linux
Mais concrètement comment dois-je procéder ?
Merci. |
|
Back to top |
|
|
jcr Modérateur français
Joined: 14 Apr 2006 Posts: 544 Location: France, Auvergne
|
Posted: Tue Feb 24, 2009 10:57 am Post subject: |
|
|
Vas sur le site http://pecl.php.net/ et là tu as toutes les extensions. Il existe des builds pour windows aussi.
Mais sinon, tu peux le remplacer en ouvrant directement un socket pour récupérer le xsl.
par exemple:
Code: |
$fp=@fsockopen($this->host,$this->port,&$this->errno,&$this->errstr,$this->number);
if (!$fp) {
return 0;
} else {
fputs($fp,"GET /radiostatus.xsl HTTP/1.1\nUser-Agent:Mozilla\n\n");
if(!feof($fp)){
$fp_data=fread($fp,31337);
usleep(500000);
}
fclose($fp);
}
|
qui peut remplacer le http_get _________________ Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group subRebel style by ktauber
|