Форум: "Сети";
Текущий архив: 2003.04.14;
Скачать: [xml.tar.bz2];
ВнизWeb Server and IsapiDLL (izvinite, chto vopros dlinii!) Найти похожие ветки
← →
NikolaB (2003-02-23 01:29) [0]Uvajaemie Mastera, i mne prishlos Web serverom izprobovat. K sojaleniu u samogo nachala u menia nepoladki.
Idia po sovetam Marco Kantu ia sdelal DLL (zdes on viden) i nastroil u home page na svoi Abyss Web server:
<li> <a href="/scripts/Project1.dll">First ISAPI Demo</a>
U samogo Abyss Web server opredelil Alias "/Scripts" i u nego folder "Scripts". V etom foldere polojil DLL-ku Project1.dll.
K sojaleniu, kogda najmu na etogo href, otkrivaetsa kokoi to download i hochet sdelat download na moi Project1.dll.
library Project1;
uses
Windows,
SysUtils,
Classes,
Isapi;
{$R *.RES}
{}function GetExtensionVersion(var Ver: Thse_Version_Info): Bool; stdcall;
begin
Result:=true;
end;
{}function HTTPExtensionProc(var ECB: TExtension_Control_Block): DWord; stdcall;
var
OutStr: string;
StrLen: Cardinal;
begin
with ECB do begin
OutStr :=
"<HTML><HEAD><TITLE>First Demo</TITLE></HEAD></BODY>"+
"<h2><cENTER>First ISAPI Demo</CENTER><H2>"+
"HELLO DELPHI... <p><hr>"+
"</body></html>";
StrLen:=length(OutStr);
WriteClient(ConnId,pChar(OutStr),StrLen,0);
end;
Result:=HSE_STATUS_SUCCESS;
end;
{}function TerminateExtension(dwFlag: DWord): Bool; stdcall;
begin
Result:=true;
end;
begin
end.
U log file est takie zapisi:
192.168.1.2 - - [23/Feb/2003:00:27:32 +0100] "GET / HTTP/1.1" 200 460 "" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)"
192.168.1.2 - - [23/Feb/2003:00:27:32 +0100] "GET /scripts/Project1.dll HTTP/1.1" 200 59392 " http://nikb/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)"
← →
NikolaB (2003-02-23 13:10) [1]Nashol horoshaia (ochen) statia Eremeeva Alekseia www.delphikingdom.com/helloworld/cgi00.htm (s 16 октября 2000)
Страницы: 1 вся ветка
Форум: "Сети";
Текущий архив: 2003.04.14;
Скачать: [xml.tar.bz2];
Память: 0.44 MB
Время: 0.008 c