Clasa se doreste a fi doar un exemplu de concept si poate fi modificata pentru a fi mai fiabila si mai sigura. A fost testata pe un sistem linux + php 5.2.4 .
Exemplu de folosire:
(retransmitere Radio ZU)
Code: Select all
<?php
/**
*
* @author vim
* @email vim@evosys.ro
* @copyright 2010 EvoSys.ro
*
* @project ShoutCast Relay
* @filename exemplu.php
* @created 01/01/2010
*
*/
set_time_limit(0);
require_once('class.ShoutcastRelay.php');
$relay = new ShoutcastRelay('81.196.2.167', '8020', 'Shoutcast PHP Relay [ http://vim.evosys.ro ]', 'various', 'http://domeniu.ro/exemplu.php', '128', '1', 'audio/aacp');
$relay->Stream();
?>
Code: Select all
rewriteengine on
rewritebase /calea/catre/fisierul/din/care/se/face/stream/
RewriteRule ^stream.mp3$ exemplu.php
Cerinte:
- fsock activ.
class.ShoutcastRelay.php
Have fun