Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2013
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
DCS 1.53 KB | None | 0 0
  1. unit Unit8;
  2.  
  3. interface
  4. uses
  5.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  6.   Dialogs, StdCtrls, lib, RegExpr, ShellAPI, Math;
  7.  
  8.   type
  9.   th_follow = class(TThread)
  10.   PRIVATE
  11.     { PRIVATE declarations }
  12.   protected
  13.     procedure Execute; override;
  14.     procedure Adds;
  15.   PUBLIC
  16.   end;
  17.  
  18. implementation
  19. uses unit1;
  20. procedure th_follow.Adds;
  21. BEGIN
  22.  inc(pms);
  23.   IF NOT (INT >= Form1.mmo6.lines.count) THEN
  24.   BEGIN
  25.     str := Form1.mmo6.lines[pms];
  26.   end
  27.   ELSE
  28.   BEGIN
  29.     str := 'exit';
  30.     Work := FALSE;
  31.   end;
  32. end;
  33.  
  34. procedure th_follow.Execute;
  35. var
  36.   link,lin,follow,indexz,res,serch,stroka:string;
  37.   i:INTEGER;
  38.   BEGIN
  39. WHILE Work=TRUE DO
  40. BEGIN
  41.   link:=Form1.mmo6.Lines[i];
  42.   res:=send('GET',''+link+'');
  43.   form1.mmo2.Lines.Add('['+TimeToStr(MyTime)+'] Делаю запрос к сайту:'+link);
  44.   serch:=Form1.Sedit1.TEXT;
  45.   IF Pos(serch,res)<>0 THEN
  46.   lin:='Есть'
  47.   ELSE
  48.   lin:='Нету';
  49.   IF Pos('<noindex>',res)<>0 THEN
  50.   indexz:='Есть'
  51.   ELSE
  52.   indexz:='Нету';
  53.    IF Pos('rel="nofollow"',res)<>0 THEN
  54.   follow:='Есть'
  55.   ELSE
  56.   follow:='Нету';
  57.   with (form1.sListView1.Items.Add()) DO BEGIN
  58.   //
  59.   Caption:=link;
  60.   SubItems.Add(lin);
  61.   SubItems.Add(indexz);
  62.   SubItems.Add(follow);
  63. end;
  64. synchronize(Adds);
  65. IF str='exit' THEN goto finish;
  66. end;
  67. form1.mmo2.Lines.Add('###################################################### Работа успешно завершенна! ######################################################');
  68. end;
  69.   end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement