PDA

Просмотр полной версии : Вопрос про Флудер на Delphi


Utochka
24.06.2006, 20:03
Вот написал флудер для одного движка на delphi, на локалхосте непашет, а в инете пашет. В чем проблема.

Вот другой исходник тоже флудера, такая же байда в инете пашет а на локалхосте нет. Объясните в чем проблема


unit main;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Spin, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdHTTP;

type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
GroupBox2: TGroupBox;
GroupBox3: TGroupBox;
GroupBox4: TGroupBox;
ListBox1: TListBox;
GroupBox5: TGroupBox;
Button1: TButton;
Button2: TButton;
SpinEdit1: TSpinEdit;
SpinEdit2: TSpinEdit;
Button3: TButton;
IdHTTP1: TIdHTTP;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
nick,host,Referer:string;
len_nick,col_mess:integer;

flood:TstringList;
implementation

{$R *.dfm}
function Nick_random(len_nick: Integer): string;
var i:integer;
buff: string;
begin
buff:='0123456789QWERTYnbma/c.;\akdfjsMJHUWY(*klskqi1$#';
for i:=0 to len_nick do
begin
nick:=nick+buff[Random(Length(buff)) + 1];
end;
end;



procedure TForm1.Button1Click(Sender: TObject);
begin
len_nick:=SpinEdit1.Value;
col_mess:=SpinEdit2.Value;
host:='localhost';
Referer:='http://localhost/';

//äåëàåì íàñòðîéêè
idhttp1.Port := 80;
idhttp1.Host := Host;
idhttp1.ReadTimeout := 10000;
idhttp1.Request.Connection := 'Keep-Alive';
idhttp1.Request.AcceptLanguage := 'ru';


idhttp1.Request.Host := Host;
idhttp1.Request.Referer := Referer;
idhttp1.Request.UserAgent := 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT.5.1)';
idhttp1.Request.ContentType := 'application/x-www-form-urlencoded';

flood:= TStringList.Create;
//request.Add('Cookie: b=b; hotlog=1');
flood.Add('chat=send');
flood.Add('message=Äà ¸ï âàøó ìàòü!');
idhttp1.Post('http://localhost/index.php?name=mess',flood);
flood.Free;
idhttp1.Disconnect;
idhttp1.DisconnectSocket;
end;

end.

Deem3n®
25.06.2006, 20:58
Как это банально не звучит: попробуй заменить localhost на 127.0.0.1

W!z@rD
25.06.2006, 22:07
Возможно Ip воспринимается, а имя компа/хоста надо преобразовавать в Ip

Utochka
25.06.2006, 22:47
Ребята все было проще )) там база уже была до меня переполнена, базу почистил все стало работать на 5+