Loging in with http.

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
x32
New Cone
New Cone
Posts: 8
Joined: 11 Aug 2017 06:34

Loging in with http.

Postby x32 » 14 Feb 2019 21:54

When you send the first command to vlc through the http interface you are asked to log in like in the attached pic. It seems to only ask for a log in for the first command of each session.

Code: Select all

http://127.0.0.1:8080/requests/status.xml?command=pl_pause

Is it possible to send the loging information in the url? Either for an initial log in or add the information to every command? I have tried a few different ways with no luck.

Code: Select all

http://127.0.0.1:8080/user=_password=1234/requests/status.xml?command=pl_pause
This one is something close to how I used to access my old email account but I can't make it work with vlc.

Any ideas??? Thanks

Image

chubinou
Developer
Developer
Posts: 521
Joined: 23 Jul 2015 15:19

Re: Loging in with http.

Postby chubinou » 15 Feb 2019 09:37

hi,

it depends about what you use to make your queries,

for instance, with wget, you can user the form

Code: Select all

wget --user= --password=pasword http://localhost:8080/requests/status.xml
with firefox, this form works

Code: Select all

http://%00:password@localhost:8080/requests/status.xml

x32
New Cone
New Cone
Posts: 8
Joined: 11 Aug 2017 06:34

Re: Loging in with http.

Postby x32 » 15 Feb 2019 20:21

Thanks. That does indeed work with Firefox but it isn't working with my scripts. I'm trying to redo a AutoHotKey script I wrote many years ago, before VLC version 2. A complete command would look like this...

Code: Select all

cmd = http://127.0.0.1:8080/requests/status.xml?command=pl_pause UrlDownloadToVar(cmd)
The control commands actually still work if you don't use a password in VLC, but it does not return the status information. I used to parse that information to retrieve the values of volume, position,... ect.

Now that I've seen the status return in Firefox, using this new command, I'm not sure the information I need to retrieve is returned. At this point I probably need to learn to use one of the other interfaces. I'm guessing the RC interface would be best to use from another application, would that be correct?


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 5 guests