I wanted to post this for anyone looking to show their server's ventrilo status on their site, when you can't use the files provided by ventrilo due to how your host is set up.
Things you will need to do:
1.) Find a site that will output an xml of your ventrilo status (just use a search engine and search for ventrilo server xml)
2.) Create a file named "index.php"
3.) Add the code below to the file and save it
4.) Upload the file to your server, from there you can use the include function to call the ventrilo status file.
[php]
//START THE TABLE, YOU CAN CHANGE THE TABLE BACKGROUND COLOE HERE
echo "
";
//SITE YOU FOUND OUTPUTTING THE XML OF YOUR VENTRILO SERVER
$xml = simplexml_load_file('http://LINK-CONTAINING-YOUR-VENTRILO-XML'); // for files
//EACH CHANNEL COLOR IS WHITE (#ffffff), YOU CAN CHANGE TO WHAT SUITS YOU
//EACH USER NAME IS GREEN (#009e1a), YOU CAN CHANGE TO WHAT SUITS YOU
//EACH "(ADMIN)" is RED (#ff0000),YOU CAN CHANGE TO WHAT SUITS YOU
foreach($xml->channel as $lobby) {
echo "";
echo " ";
echo "";
echo $lobby->attributes()->name;
echo "";
echo " |
";
}
//ALL CHANNELS UNDER LOBBY
foreach($xml->channel->channel as $channel) {
if($channel->attributes()->prot == "0"){
echo " ";
echo " ";
echo "";
echo $channel->attributes()->name;
echo "";
echo " |
";
}else{
echo " ";
echo " ";
echo "";
echo $channel->attributes()->name;
echo "";
echo " |
";
}
if($channel->client){
for ( $i = 0; $i < count($channel->client); $i++ ){
$client = $channel->client[ $i ];
if ( $client->attributes()->cid != $client->attributes()->cid )
continue;
echo " ";
echo " ";
if($client->attributes()->admin == "1"){
echo $client->attributes()->name;
echo " (Admin)";
}else{
echo $client->attributes()->name;
}
echo " |
";
}
}
//LOBBY=>CHANNEL=>SUB CHANNEL
foreach($channel->channel as $subchannel) {
if($subchannel->attributes()->prot == "0"){
echo " ";
echo " ";
echo "";
echo $subchannel->attributes()->name;
echo "";
echo " |
";
}else{
echo " ";
echo " ";
echo "";
echo $subchannel->attributes()->name;
echo "";
echo " |
";
}
if($subchannel->client){
for ( $i = 0; $i < count($subchannel->client); $i++ ){
$client = $subchannel->client[ $i ];
if ( $client->attributes()->cid != $client->attributes()->cid )
continue;
echo " ";
echo " ";
if($client->attributes()->admin == "1"){
echo $client->attributes()->name;
echo " (Admin)";
}else{
echo $client->attributes()->name;
}
echo " |
";
}
}
//LOBBY=>CHANNEL=>SUB CHANNEL=>SUB CHANNEL
foreach($subchannel->channel as $subchannel2) {
if($subchannel2->attributes()->prot == "0"){
echo " ";
echo " ";
echo "";
echo $subchannel2->attributes()->name;
echo "";
echo " |
";
}else{
echo " ";
echo " ";
echo "";
echo $subchannel2->attributes()->name;
echo "";
echo " |
";
}
if($subchannel2->client){
for ( $i = 0; $i < count($subchannel2->client); $i++ ){
$client = $subchannel2->client[ $i ];
if ( $client->attributes()->cid != $client->attributes()->cid )
continue;
echo " ";
echo " ";
if($client->attributes()->admin == "1"){
echo $client->attributes()->name;
echo " (Admin)";
}else{
echo $client->attributes()->name;
}
echo " |
";
}
}
//LOBBY=>CHANNEL=>SUB CHANNEL=>SUB CHANNEL=>SUB CHANNEL
foreach($subchannel2->channel as $subchannel3) {
if($subchannel3->attributes()->prot == "0"){
echo " ";
echo " ";
echo "";
echo $subchannel3->attributes()->name;
echo "";
echo " |
";
}else{
echo " ";
echo " ";
echo "";
echo $subchannel3->attributes()->name;
echo "";
echo " |
";
}
if($subchannel3->client){
for ( $i = 0; $i < count($subchannel3->client); $i++ ){
$client = $subchannel3->client[ $i ];
if ( $client->attributes()->cid != $client->attributes()->cid )
continue;
echo " ";
echo " ";
if($client->attributes()->admin == "1"){
echo $client->attributes()->name;
echo " (Admin)";
}else{
echo $client->attributes()->name;
}
echo " |
";
}
}
}
}
}
}
echo "
";
?>
[/php]
This will output The lobby and all channels under your lobby and upto 3 sub channels.
Example:
- Lobby
- channel
- sub channel
- sub channel
- sub channel
- sub channel
- sub channel
- another channel
- channel
etc.