方案:首先将你的注册机做成CGI或ISAPI或ASP组件。客户需要注册你的软件时由你的软件提供一个硬盘序列的标示,客户将此标示粘贴到你的网页中按下提交这时由注册程序为用户生成一个注册码(通过邮件发送也可以)。这样不就OK了?
解决方案 »
- 做windows有关socket的课程设计问题 用MFC做的..遇到个问题找不到原因
- mfc如何调用windows软键盘
- 如何模拟在列表头的分栏线上又击鼠标左键?
- 大家帮忙浏览一下 http://www.caixiong.com/?baolonghuo.htm 。只要有25个人查看一下就行了。
- 关于CRITICAL_SECTION、CCriticalSection和信号量的问题
- 怎么保存"设置"?
- help!请问.ps.gz结尾的文件如何打开?
- 我怎么给回答我问题的人分呀,这东西真难用
- 新人求教,望各位高人给点思路
- 有没有深圳的朋友,能帮帮忙吗?
- 关于对话框屏蔽回车键....谢谢
- VC用ADO怎样得到整条记录的值
首先谢谢你的无私相助,我的注册机用了RSA加密算法,用Delphi5.0实现的,不知是否
能用Delphi做那样的cgi程序实现上述功能?能否告诉我哪里可以找到这方面的编程资料?
unit Html; interface uses
Windows, Messages, SysUtils, Classes, HTTPApp; type
TWebModule1 = class(TWebModule)
procedure WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
procedure WebModule1WebActionItem2Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end; var
WebModule1: TWebModule1; implementation {$R *.DFM} procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var html:string;
begin
html:='';
html:=html+'< html >< head >< title >会员注册< /title >< /head >< center >';
html:=html+'< H2 >会员注册< /H2 >< /center >';
html:=html+'< body background="" bgcolor="#fffff" >< td >< /td >';
html:=html+'< form action="webcgi.exe\Info" method="post" id="form1" name="form1" style="FONT-SIZE: larger" >';
html:=html+'< p >姓名:< input size="12" maxlength="10" name="UserName" >< /p >';
html:=html+'< p >性别:< input type="radio" name="Sex" value="Man" checked >男';
html:=html+'< input type="radio" name="Sex" value="Woman" >女< /p >';
html:=html+'< p >年龄:< input size="5" maxlength="3" name="Age" >< /p >' ;
html:=html+'< p >所在城市:< input size="20" maxlength="16" name="City" >< /p >' ;
html:=html+'< p >Email:< input size="24" maxlength="30" name="Email" >< /p >';
html:=html+'< p >留言:< textarea name="Textarea" rows="5" cols="30" >< /textarea >< /p >';
html:=html+'< center >< input type="submit" Name="submit" value=" 提 交 " >';
html:=html+'< input type="reset" value=" 取 消" >';
html:=html+'< /form >< /center >';
html:=html+'< /BODY >< /html >';
Response.Content :=html;
end; procedure TWebModule1.WebModule1WebActionItem2Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
html:string;
Output: TextFile;
Counts,line:integer;
begin Assignfile(Output, 'List.Txt');{如果没有list.txt文件会报错,须先手工创建。}
Append(output);
for counts:=0 to Request.ContentFields.Count-2 do
begin
if counts< Request.ContentFields.Count-2 then
begin
Write(Output, Request.ContentFields.Strings[counts]);
for line:=0 to 20-length(Request.ContentFields.Strings[counts]) do
begin
Write(Output,' ');
end;
end
else
begin
Write(Output, Request.ContentFields.Strings[counts]);
Writeln(Output,' ');
end ;
end;
CloseFile(output);
html:='';
html:=html+'< html >< head >< title >Thank You!< /title >< /head >< body >';
html:=html+'< center >< P >< H2 >'+Request.ContentFields.Values['UserName'];
html:=html+'您好!您已注册成功!< /H2 >< /P >';
html:=html+'< A href="http://zhou/scripts/Webcgi.exe" >点击这里返回< /A >';
html:=html+'< /center >< /body >< /html >';
Response.Content :=html;
end; end.
为什么这样的cgi程序不能在虚拟主机里运行呢,此虚拟主机支持cgi的,是nt主机?在我的win2000里运行都很正常,请 问大家是否知道哪里有支持此类cgi程序运行的主机可以租用?
硬盘系列号是每次分区后都变化,在盗版横行的今天,只有出此下策啦。
可能是虚拟主机不支持,你发信去问问,可能有什么要求吧。