Hi to all!
I have a folder in a server with a list of files with same format. I want to allow only the application to access to these files. I thought to set an .htaccess, but i never work in a server so i ask for an help..
How can i setup this file? How can i send a request from b4a?
This is my .htaccess
.htpasswd (in this case, password i encrypted is "try". When i send a request i need to send "try" or the hash?
B4a code
Thanks!
I have a folder in a server with a list of files with same format. I want to allow only the application to access to these files. I thought to set an .htaccess, but i never work in a server so i ask for an help..
How can i setup this file? How can i send a request from b4a?
This is my .htaccess
B4X:
AuthName ""
AuthType Basic
AuthUserFile /mydomain.net/user_backup/.htpasswd
Require valid-user
.htpasswd (in this case, password i encrypted is "try". When i send a request i need to send "try" or the hash?
B4X:
try:$apr1$dR4/wKlT$iSy3ULOHuu.7jAjJQC9Bi/
B4a code
B4X:
Dim j As HttpJob
j.Initialize("",Me)
j.Download("http://mydomain.net/user_backup/FIRST.png")
j.GetRequest.SetHeader("Authorization","Basic")
j.Password = ""'don't know
j.Username ="try"
Wait For (j) JobDone(j As HttpJob)
LogColor(j.Success,Colors.Blue)
Thanks!