5
51zhan.com
Unregistered / Unconfirmed
GUEST, unregistred user!
对我来说是好难的问题,如果谁帮我解决了,真是感激不尽,在线等待中……,THttpScan单线程搜索网站邮件代码已经实现,跪求利用THttpScan实现多线程抓取邮件,急,多谢(15分)<br />httpscan4.02有多线程的功能,但就不知道怎么利用它的多线程来实现搜索。
帮帮忙啦,好几天都没解决,如要httpscan控件源码的,可以加QQ:564310230
procedure TfrmMain.HttpScan1LinkFound(Sender: TObject; UrlFound, TypeLink,
FromUrl, HostName, UrlPath, UrlPathWithFile, ExtraInfos: String;
var WriteToFile: String; HrefOrSrc: Char; CountArea: Integer;
var FollowIfHtmlLink: Boolean);
begin
inc (CountLinks);
StatusBar1.SimpleText :=' ( ' + TurnWheel + ' ) ' + IntToStr (CountLinks) + ' 已搜索, 正在搜索:'+UrlFound;
if not (typelink<>'mail') then
Memo_tmp_mail.Lines.Add(UrlFound) ;
end;
procedure TfrmMain.check_only_mailClick(Sender: TObject);
var flext:string[4]; //判断文件扩展名是否为。TXT,
begin
if check_only_mail.Checked then
begin
httpscan1.TypeFilterEnabled:=check_only_mail.Checked;
HttpScan1.TypeFilter := 'mail';
end;
procedure TfrmMain.btn_tool_searchClick(Sender: TObject);
var
Ok : boolean;
// a: tse
begin
if not boolean(pos ('://', frmMain.combo_url.Text)) then
frmMain.combo_url.Text:= 'http://'+frmMain.combo_url.Text;
frmMain.httpscan1.ProxyAddress:=frmMain.edt_proxy_ipaddress.Text;
frmMain.HttpScan1.ProxyPort:=integer(frmMain.edt_proxy_port.Text);
frmMain.HttpScan1.UserName:=trim(frmMain.edt_proxy_user.Text);
frmMain.HttpScan1.Password:=trim(frmMain.edt_proxy_password.Text);
frmMain.HttpScan1.FileOfResults:=frmMain.edt_searchresults.Text;
frmMain.HttpScan1.Retries:=integer(frmMain.edt_proxy_cs.Text);
frmMain.httpscan1.TimeOut:=integer(frmMain.edt_proxy_timeout.Text);
frmMain.HttpScan1.FileOfResults :=frmMain.edt_searchresults.text;
frmMain.HttpScan1.DepthSearchLevel:=integer(frmMain.edt_leverl.text);
ok:=frmMain.HttpScan1.Start(frmMain.combo_url.Text);
if Ok then begin
frmMain.CountLinks := 0;
frmMain.combo_url.Text:=frmMain.HttpScan1.StartingUrl;
end;
end;
帮帮忙啦,好几天都没解决,如要httpscan控件源码的,可以加QQ:564310230
procedure TfrmMain.HttpScan1LinkFound(Sender: TObject; UrlFound, TypeLink,
FromUrl, HostName, UrlPath, UrlPathWithFile, ExtraInfos: String;
var WriteToFile: String; HrefOrSrc: Char; CountArea: Integer;
var FollowIfHtmlLink: Boolean);
begin
inc (CountLinks);
StatusBar1.SimpleText :=' ( ' + TurnWheel + ' ) ' + IntToStr (CountLinks) + ' 已搜索, 正在搜索:'+UrlFound;
if not (typelink<>'mail') then
Memo_tmp_mail.Lines.Add(UrlFound) ;
end;
procedure TfrmMain.check_only_mailClick(Sender: TObject);
var flext:string[4]; //判断文件扩展名是否为。TXT,
begin
if check_only_mail.Checked then
begin
httpscan1.TypeFilterEnabled:=check_only_mail.Checked;
HttpScan1.TypeFilter := 'mail';
end;
procedure TfrmMain.btn_tool_searchClick(Sender: TObject);
var
Ok : boolean;
// a: tse
begin
if not boolean(pos ('://', frmMain.combo_url.Text)) then
frmMain.combo_url.Text:= 'http://'+frmMain.combo_url.Text;
frmMain.httpscan1.ProxyAddress:=frmMain.edt_proxy_ipaddress.Text;
frmMain.HttpScan1.ProxyPort:=integer(frmMain.edt_proxy_port.Text);
frmMain.HttpScan1.UserName:=trim(frmMain.edt_proxy_user.Text);
frmMain.HttpScan1.Password:=trim(frmMain.edt_proxy_password.Text);
frmMain.HttpScan1.FileOfResults:=frmMain.edt_searchresults.Text;
frmMain.HttpScan1.Retries:=integer(frmMain.edt_proxy_cs.Text);
frmMain.httpscan1.TimeOut:=integer(frmMain.edt_proxy_timeout.Text);
frmMain.HttpScan1.FileOfResults :=frmMain.edt_searchresults.text;
frmMain.HttpScan1.DepthSearchLevel:=integer(frmMain.edt_leverl.text);
ok:=frmMain.HttpScan1.Start(frmMain.combo_url.Text);
if Ok then begin
frmMain.CountLinks := 0;
frmMain.combo_url.Text:=frmMain.HttpScan1.StartingUrl;
end;
end;