Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Сети";
Текущий архив: 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
1-44128
Delphi-Beginner
2003-04-03 11:33
2003.04.14
вопрос из области использования QReport


4-44494
Slap
2003-02-12 16:40
2003.04.14
изменение формата даты в Windows


14-44370
Scotch
2003-03-25 23:25
2003.04.14
Вопрос по хостингу


3-43995
b_baranov
2003-03-24 19:12
2003.04.14
Хранение и редактирование документов


6-44290
Ruf
2003-02-20 12:41
2003.04.14
доступ к инету





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский