Hi,
Can we call Wowza server from PHP?
For example, I would want to disconnect a user from a particular stream or application via PHP. Is this possible?
Thanks!
Mansoor
Hi,
Can we call Wowza server from PHP?
For example, I would want to disconnect a user from a particular stream or application via PHP. Is this possible?
Thanks!
Mansoor
You can use HTTProvider, and here is one that will do that:
http://www.wowzamedia.com/forums/sho...d.php?t=8240#2
You need to compile with Wowza IDE:
http://wowzamedia.com/ide.html
Then add reference to /conf/VHost.xml /HostPort (1935) /HTTProviders. Make it 2nd to last in the list (because the last item is a catchall):
<HTTPProvider>
<BaseClass>package com.wowza.wms.plugin.http.HTTPDisconnectClient</BaseClass>
<RequestFilters>*disconnect</RequestFilters>
<AuthenticationMethod>none</AuthenticationMethod>
</HTTPProvider>
Then call something like:
http://[wowza-address]:1935/disconnect?id=1234&app=vod
where "1234" is a clientID, and "vod" is the application name.
Richard
Last edited by rrlanham; 01-08-2013 at 06:34 AM.
Hi,
This is a 2 ( well, 3) year old post but I believe people still need such a thing. So, does this work with WMS v3.5/IDE v2? If no, any other pointers?
By the way, the "package" word seems to have been added inadvertently in <BaseClass> line above. Or should it really be like this only?
Thanks
Inderjeet
Yes, HTTPProviders are supported in Wowza 3.5
Richard
Thank you, Richard.
I am aware of that, but does the above method work when applied after completing the steps in http://www.wowza.com/forums/showthre...http-request#2
After doing everything, even opening http://[wowza-url]:1935 shows
error: null
disconnected: 0
(or the ID when supplied with ?disconnect=1234).
Yes, the module entry in VHost.xml/HTTPProviders is at the right place, just before the last one. Could something have changed in the newer WMS version making the code not to work?
It would be appropriate to mention here that I am new to Java, but other than that, no problem.
Thanks for your assistance!
Sincerely
Inderjeet
Inderjeet,
I set it up and tested. Works great still.
This is how it is called:
You can get a clientid from serverinfo:Code:http://[wowza-address]:1935/disconnect?id=32442805&app=vod
RichardCode:http://[wowza-address]:8086/serverinfo
I think the problem was the HTTP url above. I had omitted the "&app=[app-name]" part.
Richard
Hi,
Thanks Richard. Yes, that was the problem.
Another issue, in case someone else refers to this post, is the VHost.xml entry should read as:
<HTTPProvider>
<BaseClass>com.wowza.wms.plugin.http.HTTPDisconnectClient</BaseClass>
<RequestFilters>*disconnect</RequestFilters>
<AuthenticationMethod>none</AuthenticationMethod>
</HTTPProvider>
There is an additional "package" word prepended (copy/pasted?) in your reply above.
Now the only glitch is when this module is active, opening http://[wowza-ip]:1935 also shows the error response from the module instead of the default Wowza message.
Thanks for your help!
Regds
Inderjeet
Always put your HTTPProvider 2nd to last, above the one with RequestFilter "*"
Richard