Autor Beitrag
Yooda
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 68



BeitragVerfasst: Mi 27.08.03 00:21 
Hi...

Ich bin total neu....
und suche hilfe...

Ich rufe eine internetseite in meinem versteckten Webbrowser auf...
Beispiel www.irgendeinedomain...er=5678i91jndbca9434

als ergebnis liefert das php script NUR 1 ODER 0 im quelltext ! ! !

Wie bekomme ich das mit der Software ausgelesen sodass ich es verarbeiten kann?

also als Beispiel


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
var ok:integer;
if ok = '1' then
begin
showmessage('alles ok');
end
else
begin
showmessage('NIX FALSCH !! ! ! ! ');
APPLICATION.Terminate;
end;


Dies soll eine überprüfung sein ob die Software keine kopie ist.

Moderiert von user profile iconAya: Delphi-Tags hinzugefügt
Ex0rzist
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 550

Win XP Prof.
Mandrake 10.0

D6
BeitragVerfasst: Mi 27.08.03 01:12 
Hallo,

wenn du die FastNet-Komponenten hast, lass den Webbrowser weg und nimm die NMHTTP-Komponente.
Dann sieht das ganze so aus:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
Function CheckSerial(URL: String):Boolean;
begin
Result := False;
NMHTTP1.Get(URL); 
{ URL = h**p://www.irgendeinedomain.de/check.php?seriennummer=5678i91jndbca9434  }
If NMHTTP1.Body = 1 then
 Result := True; 
end;


Alternativ kannst du auch die Indy-Komponenten nehmen. Dort müsste es ähnlich sein.

_________________
If accidentally read, induce vomitting.
Yooda Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 68



BeitragVerfasst: Mi 27.08.03 01:25 
Titel: hmmmm
Das ist mir zu Kompliziert... :autsch:
Ich Programmiere erst seit 2 Tagen mit Delphi...
Vorher nur Php entwickler....
Ich kenne noch nicht so viel davon...

Ich kenne halt nur:

ausblenden Quelltext
1:
webbrowser1.Navigate('http://www.irgendeinedomain.de/register.php?one=' + Edit1.Text + '&two=' + Edit2.Text + '&three='+ Edit3.Text + '&name=' + Edit4.Text);					


mehr kann ich nicht...
kann man das irgendwie einem dummen wie mir begreiflicher machen? :?!?:
Was NMHTTP ist -> Böhmische Dörfer :nixweiss:
Und Indy -> Nen Spiel... (Indiana Jones) :hair:
Ex0rzist
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 550

Win XP Prof.
Mandrake 10.0

D6
BeitragVerfasst: Mi 27.08.03 01:31 
NMHTTP heisst die Komponente von FastNet.
Indy = www.indyproject.org :wink:

Was hast du denn für eine Delphi-Version? Schau mal in deinen Komponentenreitern, ob du dort "FastNet" oder "Indy Client" o.ä. stehen hast.
Wenn nicht, kannst du die Indy-Komponenten auf oben genannter Seite herunterladen.

Wie du dann deine Anfrage herunterlädst steht zum Beispiel hier (Indy).

_________________
If accidentally read, induce vomitting.
Yooda Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 68



BeitragVerfasst: Mi 27.08.03 01:46 
Titel: Ich habe:
Ich habe folgende Punkte:

Indy Clients
Indy Server
Indy Intercepts
Indy I/O Handler
Indy Misc

Hilft das weiter?
Ex0rzist
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 550

Win XP Prof.
Mandrake 10.0

D6
BeitragVerfasst: Mi 27.08.03 12:24 
Ja,

unter "Indy Clients" müsste eine Komponente sein, die "IdTTP" heisst.
Die ziehst du auf deine Form und machst es dann so, wie hier.
Yooda Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 68



BeitragVerfasst: Mi 27.08.03 14:31 
Titel: :-(
Ich muss ganz ehrlich sagen... ich habe keine ahnung wie ich das anstelle...


Ich muss ja vorher noch die Seriennummer an den quellcode schicken um zu prüfen ob das programm nicht "kopiert" wurde...

Ich habe es versucht, aber aus dem anderen wurde ich nicht schlau...

Zum Test:

Eine Form mit einem Button drauf.
Wenn man draufklickt soll die Url gelesen werden und
der Inhalt als showmessage() dargestellt werden.
Wie gehe ich da in meinem Fall vor?
Ich habe eine Php date bereitgestellt, der man den wert 12345 übergeben
muss um eine 1 zu bekommen. Ansonsten wird 0 ausgegeben

Die Url die aufgerufen werden muss ist:
www.mitgeboten.de/test.php?wert=12345


Ich würde mich freuen wenn ihr mir helfen könntet...
Für die Geduld mit mir im Vorraus danke!
Ex0rzist
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 550

Win XP Prof.
Mandrake 10.0

D6
BeitragVerfasst: Mi 27.08.03 15:47 
So,

du brauchst ein Edit-Feld, einen Button und die IdHTTP-Komponente aus dem Reiter Indy Clients. Das ziehst du auf deine Form. Dann machst du einen Doppelklick auf deinen Button und fügst folgendes im Quellcode ein:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.Button1Click(Sender: TObject);
begin
If IdHTTP1.Get('http://www.mitgeboten.de/test.php?wert='+Edit1.Text) = '1' then
 Showmessage('Ok')
else
 Showmessage('Falsch');
end;


Im Edit1 steht dann deine Seriennummer. Diese wird als GesamtURL per GET an dein Script geschickt. Der Rückgabewert wird dann verglichen.
Man könnte dafür auch noch eine zusätzliche Variable verwenden, in der der Rückgabestring gespeichert wird.

Allerdings würde ich von dieser Methode abraten, da das ganze durch ändern eines(!) Bytes gecrackt werden kann. Aber das ist eine andere Geschichte. :wink:

_________________
If accidentally read, induce vomitting.
Yooda Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 68



BeitragVerfasst: Do 28.08.03 00:57 
Titel: *FREU*
VIELEN DANK!!!!

ES FUNKTIONIERT :D
Yooda Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 68



BeitragVerfasst: Sa 27.09.03 13:37 
Ich habe nocheine Frage dazu:


Wie kann ich vergleichen, ob ein gesamter satz sich geändert hat?
Beispiel:

212.227.248.211/fsend.php

Da ist ein satz.

Der ist leider auch mit einem Zeilenumbruch...
Wenn sich dieser satz ändert, dann steht da nacher was komplett anderes.
Also Flotten versenden oder sowas...
Wie kann ich das machen???

Mein bisheriger quelltext sieht so aus:



ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Bevel1: TBevel;
    Bevel2: TBevel;
    Image1: TImage;
    Label1: TLabel;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    IdHTTP1: TIdHTTP;
    Timer1: TTimer;
    Label2: TLabel;
    Edit1: TEdit;
    Label3: TLabel;
    Edit2: TEdit;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
Timer1.Enabled:= true;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
close();
end;

procedure TForm1.Timer1Timer(Sender: TObject);
var eins:string;
var zwei:string;
begin
eins := IdHTTP1.Get('http://212.227.248.211/fsend.php');
zwei := IdHTTP1.Get('http://www.mitgeboten.de/fsend_php.htm');
edit1.text := eins;
edit2.text := zwei;

if eins = zwei then
begin
 Showmessage('Es hat sich was getan....')
end
else
 Label2.Caption := 'Unverändert';
 Timer1.Interval:= 300000;
 Label3.Caption := 'Gesetzt';
end;
end.


Nur leider funktionier es nicht... Habt ihr einen Vorschlag für mich?
NeoXan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81

WinXP Sp1 Home
D7 Prof
BeitragVerfasst: Fr 27.08.04 09:52 
Vielleicht mit einem Stream?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
var Response : TStringStream;
Response := TStringStream.Create('');
idHttp.Get('http://www.xxx.de/', Response);
Memo1.Lines.Add(Response.DataString);