Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi Fehler be IdHTTP (https://www.delphipraxis.net/140903-fehler-idhttp.html)

n3r0f0x 28. Sep 2009 16:59


Fehler be IdHTTP
 
Hi,
ich habe nach einem Tuturial(Klick Mich) einen script erstell der an eine PHP datei auf einen Webserver eine nachricht sendet. Aber leider functioniert es nicht ganz so wie ich möchte
Delphi-Quellcode:
unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Memo1: TMemo;
    Memo2: TMemo;
    Button1: TButton;
    IdHTTP1: TIdHTTP;
    procedure Button1Click(Sender: TObject);
   
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var Strings: TStringList;
begin


  Strings := TStringList.Create;
  Button1.Enabled := False;
  try
    Strings.Add('mode=write');
    Strings.Add('user='+Edit1.Text);
    Strings.Add('pw='+Edit2.Text);
    Strings.Add('code='+Memo1.Lines.Text);
    try
      HTTP.Post('http://www.deinhost.de/interface.php', Strings);
    except
     on E: Exception do
       showmessage('Error encountered during POST: ' + E.Message);
    end;
  finally
    Strings.Free;
  end;
  Button1.Enabled := True;
end;



end.
Als Fehlermeldung bekomme ich:
Code:
[DCC Error] Unit1.pas(47): E2003 Undeclared identifier: 'HTTP'
wäre nett wenn ihr mir helfen könntet

mfg

n3r0f0x

DeddyH 28. Sep 2009 17:00

Re: Fehler be IdHTTP
 
Hallo und Willkommen in der DP :dp:,

Deine Komponente heißt ja auch IdHTTP1 und nicht HTTP ;)

n3r0f0x 28. Sep 2009 17:27

Re: Fehler be IdHTTP
 
dankeee :-D
functioniert alles :-D :-D :-D mfg n3r0f0x


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:27 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz