Posts: 484
Threads: 49
Joined: Feb 2011
I'm trying to get access to protected file by sending username and password in url, but server is every time returing code 1 (HTTP_ERROR_BAD_HOST).
Example:
pawn Код:
HTTP(playerid, HTTP_GET, "http://user:pass@domain.com/file.txt", "", "MyHttpResponse");
And also can someone explain me how to use 4th param in HTTP function.
Posts: 132
Threads: 5
Joined: Aug 2013
Reputation:
0
4th param is post.. i dont think u need that for .txt file
What exactly are u trying to do with this? login system?
Posts: 484
Threads: 49
Joined: Feb 2011
To get data from protected file...
Posts: 484
Threads: 49
Joined: Feb 2011
Hmm, is there anyway to allow server ip and other user:pass accs by htaccess?
Posts: 2,175
Threads: 235
Joined: Sep 2009
Reputation:
0
Check for htaccess and htpasswd tutorials on web
Posts: 484
Threads: 49
Joined: Feb 2011
Sloved...
AuthUserFile /path/to/.htpasswd
AuthName "Private"
Authtype Basic
require valid-user
order deny,allow
deny from all
allow from x.x.x.x
allow from 127.0.0.1
Satisfy Any