以下是我的config.phpSHOUTcast服務器PHP無法運行
<?php
$CONFIG['music_dir'] = './music/anak-ayam.mp3';
$CONFIG['encoder_path'] = 'lame.exe';
$CONFIG['bitrate'] = '64';
$CONFIG['server_name'] = 'Test Shoutcast Server';
$CONFIG['server_genre'] = 'Random';
$CONFIG['server_url'] = 'http://localhost:45401/';
$CONFIG['server_public'] = '0';
$CONFIG['metadata_interval'] = '8192';
以下是我run.php
<?php // $Id$
require 'config.php';
require 'server.php';
require 'shoutcast.php';
require 'audiosource.php';
require 'http.php';
set_time_limit(0);
$Server = new Server();
$AudioSource = new AudioSource();
$AudioSource->bitrate = $CONFIG['bitrate'];
$AudioSource->encoder = $CONFIG['encoder_path'];
$AudioSource->metadata_interval = $CONFIG['metadata_interval'];
$AudioSource->populate_playlist($CONFIG['music_dir']);
$AudioSource->open_next_file();
$Shoutcast = new Shoutcast();
$Shoutcast->server = &$Server;
$Shoutcast->source = &$AudioSource;
$Shoutcast->metadata_interval = $CONFIG['metadata_interval'];
$Shoutcast->server_name = $CONFIG['server_name'];
$Shoutcast->server_genre = $CONFIG['server_genre'];
$Shoutcast->server_url = $CONFIG['server_url'];
$Shoutcast->server_public = $CONFIG['server_public'];
$Shoutcast->hook_to_server();
$HTTP = new HTTP();
$HTTP->server = &$Server;
$HTTP->shoutcast = &$Shoutcast;
$HTTP->hook_to_server();
$Server->listen();
我在Windows 7上,當運行我嘗試運行腳本,這是我得到的輸出
c:\xampp\htdocs\shoutcast>php run.php
Playing:
雖然預期輸出是
c:\xampp\htdocs\shoutcast>php run.php
Playing: anak-ayam.mp3
我想創建自己的網上廣播服務器,請幫助。我該如何解決這個問題?
您可以發佈您'run.php' – Yogus