Главная страница
    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
7-44471
Borys
2003-02-18 13:23
2003.04.14
Управление службами (сервисами)


14-44363
arbiter
2003-03-28 16:26
2003.04.14
DBGrid с поддержкой стилей XP


6-44319
Serhij H.
2003-02-19 18:35
2003.04.14
Вопрос по ShellExecute :) или WebBrowser.


1-44235
Sectey
2003-04-02 09:04
2003.04.14
Координаты иконки в трее


3-44008
Suharew
2003-03-23 23:05
2003.04.14
SQL- как показать записи из 2-х таблиц





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский