Author Topic: Downloading a picture with username + password  (Read 2592 times)

0 Members and 1 Guest are viewing this topic.

Offline CletusSnow

  • Newbie
  • Posts: 1
    • View Profile
Downloading a picture with username + password
« on: May 01, 2019, 10:04:59 am »
Hello friends,

I hope you can help me a little bit.
I want do download a .jpg from my IP camera's http server, so I use the Download Function from the Wiki. It works fine.

When I am not at home I also want to do download this file. Therefore I use another port than port 80 because of routing through my internet router. No problem so far.
But now I need username and password. How can I send username and password to the server? Is it possible to do something like this?
 
I mean, it's easy to use Firefox for this, e.g. "user:pass@camhost.dyndns.org/picture.jpg", but I want to use this function inside a bigger QB program.

I hope you know what I mean. Excuse my bad English.

Greeting from Germany!

Offline _vince

  • Seasoned Forum Regular
  • Posts: 422
    • View Profile
Re: Downloading a picture with username + password
« Reply #1 on: May 01, 2019, 02:58:16 pm »
You must add an authorization entry to your HTTP packets, ie:

Authorization: Basic adsfasdf324r

more on how to create this:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization

It might be that your iptv uses HTTPS or some other kind of encryption so there might be more steps