Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 12:36

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 
Author Message
 Post subject: Ventrilo Status PHP Library
PostPosted: 08 Oct 2008 15:44 

Joined: 08 Oct 2008 15:19
Posts: 3
i'm looking for a php library to fetch the status of ventrilo servers, when not on the same machine. is there already a port of the "ventrilo_alog.h" for php available?


Top
 Profile  
 
 
 Post subject: Re: Ventrilo Status PHP Library
PostPosted: 08 Oct 2008 18:04 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
no, ventrilo_algo.h is not what you need.

The following is the php port of my ventstat program made by Mark Veaudry (luckily I have a backup since his website no longer works from months):

http://aluigi.org/papers/ventrilo_status_php.zip


Top
 Profile  
 
 Post subject: Re: Ventrilo Status PHP Library
PostPosted: 08 Oct 2008 22:11 

Joined: 08 Oct 2008 15:19
Posts: 3
Big Thanks for the fast response and the status script, Luigi !
It's working fine(!) for ventrilo servers with version "3.0.3".

But i tried also requests on servers with version "3.0.3.A", like "hydrogen.typefrag.com:8035". There is only response for cmd(1) incomming - so we know the server is up! For cmds (3&7) it's returning nothing. I tried the extra cmd-line statustool you provide, getting the following errormessage: "ERROR: Received more packets than the maximum allowed in a response." I guess they changed their packet layout a litte for the newer version? May i ask, that you could look into this?


Top
 Profile  
 
 Post subject: Re: Ventrilo Status PHP Library
PostPosted: 08 Oct 2008 23:09 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
I have made a quick test and that server replies to command 3 and 7 too and before my previous post I did the same test with another 3.0.3a server with the same successful result.

Maybe when you tried it the server had more traffic and so the reply didn't arrive in time


Top
 Profile  
 
 Post subject: Re: Ventrilo Status PHP Library
PostPosted: 08 Oct 2008 23:36 

Joined: 08 Oct 2008 15:19
Posts: 3
You're right! It Works! Thanks a lot for your effort!


Top
 Profile  
 
 Post subject: Re: Ventrilo Status PHP Library
PostPosted: 03 Jun 2009 17:58 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
remaining in theme of ventrilo and php the user Renegade334 has just sent me a php port of the ventrilo_pwd_hash function which I have attached to this post.


Attachments:
ventrilo_pwd_hash.inc.zip [2.75 KiB]
Downloaded 259 times
Top
 Profile  
 
 Post subject: Re: Ventrilo Status PHP Library
PostPosted: 24 Jun 2009 20:57 

Joined: 26 Apr 2008 21:50
Posts: 27
Ventrilo officialy provide a PHP status script on their download page, may be interesting, just check it out on their download page =)


Top
 Profile  
 
 Post subject: Re: Ventrilo Status PHP Library
PostPosted: 24 Jun 2009 21:08 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
the one provided by ventrilo it's not a real php file because it's simply based (a wrapper of the results) on their ventrilo_status command


Top
 Profile  
 
 Post subject: Re: Ventrilo Status PHP Library
PostPosted: 25 Jun 2009 01:20 

Joined: 26 Apr 2008 21:50
Posts: 27
Ah ok I now understand why you made one. Would do it the same way :)


Top
 Profile  
 
 Post subject: Re: Ventrilo Status PHP Library
PostPosted: 01 Sep 2009 16:33 

Joined: 01 Sep 2009 16:28
Posts: 2
Is it possible to get an output formatted like on this page without using the ventrilo_status program provided by Ventrilo?

So by using just PHP. The PHP port of your Ventstat program unfortunately doesn't have an advanced output like on the above exemple page.


Top
 Profile  
 
 Post subject: Re: Ventrilo Status PHP Library
PostPosted: 01 Sep 2009 16:51 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
I guess that the only solution is the manual handling of the output of ventstat or its php port.
so you must write something like a parser which is not difficult if you know php.
anyway I guess that already exists something similar for ventrilo_status.exe which has just the same output of ventstat


Top
 Profile  
 
 Post subject: Re: Ventrilo Status PHP Library
PostPosted: 01 Sep 2009 17:07 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
you can also use the page visualized by "status.php" on the Ventrilo website to build the channels list as a big help in figuring all the fields returned by the server and how to build the correct channels tree.

example of a "command code 2" reply:
Code:
CHANNELCOUNT: 19
CHANNELFIELDS: CID,PID,PROT,NAME,COMM
CHANNEL: CID=777,PID=0,PROT=0,NAME=1.example Contact Info:,COMM=
CHANNEL: CID=778,PID=0,PROT=1,NAME=2.example Staff:,COMM=
CHANNEL: CID=779,PID=777,PROT=0,NAME=Current Customers:,COMM=
CHANNEL: CID=780,PID=777,PROT=0,NAME=Non Customers:,COMM=
CHANNEL: CID=781,PID=778,PROT=1,NAME=Staff Offices:,COMM=
CHANNEL: CID=782,PID=778,PROT=1,NAME=Conference Rooms,COMM=
CHANNEL: CID=783,PID=779,PROT=0,NAME=Support,COMM=Email: Support@example.com
CHANNEL: CID=784,PID=780,PROT=0,NAME=Sales,COMM=Email: Sales@example.com
CHANNEL: CID=785,PID=780,PROT=0,NAME=Support,COMM=Email: Contact@example.com
CHANNEL: CID=786,PID=781,PROT=1,NAME=Don's Office,COMM=
CHANNEL: CID=787,PID=781,PROT=1,NAME=NixMaster's Office,COMM=
CHANNEL: CID=788,PID=781,PROT=1,NAME=Craig's Office,COMM=
CHANNEL: CID=789,PID=781,PROT=1,NAME=Mark's Office,COMM=
CHANNEL: CID=790,PID=781,PROT=1,NAME=Xavier's Office,COMM=
CHANNEL: CID=791,PID=781,PROT=1,NAME=Anthony's Office,COMM=
CHANNEL: CID=792,PID=781,PROT=1,NAME=Mike's Office,COMM=
CHANNEL: CID=793,PID=782,PROT=1,NAME=Training Room,COMM=
CHANNEL: CID=794,PID=782,PROT=1,NAME=Working Staff,COMM=
CHANNEL: CID=795,PID=782,PROT=1,NAME=Meeting DND,COMM=
CLIENTCOUNT: 0
where you have:
CID: the id of the channel
PID: the parent ID, so the main channel to which it's owned
PROT: 0 for public channels, 1 for those limited or password protected (red)
NAME: name of the channel

so in the example I posted you will have the following tree:
Code:
Lobby
    1.example Contact Info:
        Current Customers:
            Support (Email: Support@example.com)
        Non Customers:
            Sales (Email: Sales@example.com)
            Support (Email: Contact@example.com)
    2.example Staff:
        Staff Offices:
            Don's Office
            NixMaster's Office
            Craig's Office
            Mark's Office
            Xavier's Office
            Anthony's Office
            Mike's Office
        Conference Rooms
            Training Room
            Working Staff
            Meeting DND
this is what I figured in some minutes while replying to your post for providing an example, so come on :)


Top
 Profile  
 
 Post subject: Re: Ventrilo Status PHP Library
PostPosted: 01 Sep 2009 17:11 

Joined: 01 Sep 2009 16:28
Posts: 2
I'm quite new to PHP but I'll figure it out, I love to learn new stuff so this will keep me busy for a while :P

Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 

All times are UTC [ DST ]


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 post attachments in this forum

Search for:
cron