Hi, I am using Icecast 2.4.4 and can access the list of clients with <domain.com>:port/admin/listclients?mount=<stream> and supplying the username and password. However, I would like to be able to access this page programmatically using either python or php so that I can automate some tasks but can't find a way of providing the username and password. Is there a way, please, of being able to do this so that the login page can be circumvented? Thanks for any help. Regards Richard Bartholomew -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/icecast/attachments/20211230/bf37010a/attachment.htm>
If you use Python, for instance, you can use the requests module and then supply the username/password using the auth dict: r = requests.get(URL, auth=(username, password)) -- Marius On 30.12.2021 23:22, Richard Bartholomew wrote:> > Hi, > > I am using Icecast 2.4.4 and can access the list of clients with > <domain.com>:port/admin/listclients?mount=<stream> and supplying the > username and password. > > However, I would like to be able to access this page programmatically > using either python or php so that I can automate some tasks but can't > find a way of providing the username and password. > > Is there a way, please, of being able to do this so that the login > page can be circumvented? > > Thanks for any help. > > Regards > > Richard Bartholomew > > > _______________________________________________ > Icecast mailing list > Icecast at xiph.org > http://lists.xiph.org/mailman/listinfo/icecast-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/icecast/attachments/20211230/a14f15f3/attachment.htm>
check php/curl/simplexml:
/* url, eg: http://127.0.0.1:8000/admin/viewxml.xsl?mount=/yourmount */
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERPWD, ICECAST_LOGIN);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,0);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
$result = curl_exec($ch);
curl_close($ch);
if($result) {
try {
???? $xml = new SimpleXMLElement($result);
???? $listeners = $xml->LISTENERS->LISTENER;
...
}
Am 30.12.21 um 23:22 schrieb Richard Bartholomew:>
> Hi,
>
> I am using Icecast 2.4.4 and can access the list of clients with
> <domain.com>:port/admin/listclients?mount=<stream> and
supplying the
> username and password.
>
> However, I would like to be able to access this page programmatically
> using either python or php so that I can automate some tasks but can't
> find a way of providing the username and password.
>
> Is there a way, please, of being able to do this so that the login
> page can be circumvented?
>
> Thanks for any help.
>
> Regards
>
> Richard Bartholomew
>
>
> _______________________________________________
> Icecast mailing list
> Icecast at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.xiph.org/pipermail/icecast/attachments/20211231/cbd5af4e/attachment.htm>