Autor Beitrag
Andre :-)
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: Fr 24.01.03 21:47 
Hi,

kann mir jemand bitte helfen. Wie kann ich unter Delphi von einem PHP Script auf einem Server den result empfangen?:oops:

Gruss
Andre

_________________
Security is just a feeling, but never reality
bis11
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1247
Erhaltene Danke: 2

Apple Mac OSX 10.11

BeitragVerfasst: Sa 25.01.03 01:51 
Was willst Du konkret machen ? Schreibt das PHP-Skript in eine TXT-Datei ? Übergibt das PHP-Skript nur Werte an die Adresszeile in Variablen ?
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 25.01.03 11:23 
die indy http kompo hat das ereignis GET. bei dem gibts du als Parameter die URL an und die funkton gibt dir das result zurück !!!

ausblenden Quelltext
1:
Showmessage(IDHttp.Get ('http://www.auq.de'));					

der code gibt dir eine reise messagebox aus in dem der komplette quelltext der auq de startseite drin ist. also das was dir der server zurückgibt !!

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Andre :-) Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: Sa 25.01.03 20:22 
also ich möchte das mir ein PHP Script beim create der Form einen Wert übergibt. SO als ob ich in einer function ein return Wert mache. Diesen Wert möchte ich dann nutzen, bzw. setzen können.

Ok, ich weiss nicht ob das überhaupt möglich ist, :oops: aber ich werde das mal mit der INDI Komponente versuchen.

Danke
Andre :-)

_________________
Security is just a feeling, but never reality
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 26.01.03 12:00 
mach das mal. setz einfach den GET code in OnFormCreate rein und fertig !!!

du musst allerdintgs aufpassen: denn bevor dein proggi angezeigt wird, wird der komplette Create Code abgearbeitet. wenn der server von dem du das holst also down ist, kann es schonmal ne zeit lang dauern bis der prog angezeigt wird !!!

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Andre :-) Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: So 26.01.03 20:54 
Also für die, die es interessiert.
Ich habe es jetzt wie folgt hinbekommen:

1. Ich habe die Indi Http Komponente genommen wie im Forum
angesprochen und habe das Stringergebis einer public Variable
übergeben. FERTIG

2. Um ein Ergebnis zu bekommen habe ich dann eine PHP Script
geschrieben welches sich aus einer DB, Werte ( gesteuert über einen
CASE ) holt und dann einem Parameter zuweist.

ausblenden Quelltext
1:
2:
3:
...
$name = $row->name
...


dann konnte ich mir über die Get Methode den Result, also $name,
geben lassen.

ausblenden Quelltext
1:
tvolumen := IdHTTP1.Get('http://localhost/test.php?s=0');					


Gruss
Andre

_________________
Security is just a feeling, but never reality
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 26.01.03 21:04 
ja wunderbar !!!!

_________________
In the beginning was the word.
And the word was content-type: text/plain.