| Новости | FAQ | Авторы | Документация | В действии | Библиотека |
| Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Александр Петросян (PAF) 13.08.2003 14:40 / 13.08.2003 14:41
найдите wget, вызовите его с нужным пользователь/пароль. возьмите поле Authorization, подставьте в свой код:^xxx::load[http://server/uri; $.Authorization[Basic VVNFUjpQQVNT] ]
C:\Documents and Settings\paf\My Documents>wget -d --http-user=USER --http-passwd=PASS http://host
DEBUG output created by Wget 1.8.2 on Windows.
--14:36:22-- http://host/
=> `index.html.1'
Resolving host... done.
Caching host => x.x.x.x
Connecting to host[x.x.x.x]:80... connected.
Created socket 712.
Releasing 008949C0 (new refcount 1).
---request begin---
GET / HTTP/1.0
User-Agent: Wget/1.8.2
Host: host
Accept: */*
Connection: Keep-Alive
Authorization: Basic VVNFUjpQQVNT
---request end---
HTTP request sent, awaiting response... HTTP/1.1 401 Authorization Required
Date: Wed, 13 Aug 2003 10:36:26 GMT
Server: Apache/1.3.23 (Unix) rus/PL30.11
WWW-Authenticate: Basic realm="host"
Connection: close
Content-Type: text/html; charset=iso-8859-1
Closing fd 712
Authorization failed.