Autor Beitrag
huhn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 272
Erhaltene Danke: 1

WIN XP
D7Pers
BeitragVerfasst: Di 16.08.05 14:45 
Hi leute!
ich hab scho ziemlich erfahrung mit der Indy kompo und so aber irgendwie weiß ich nich warum folgendes nich funktioniert:
Dies ist die seite die ich lade und auf der ich was posten will ohne die post-methode
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:
<body bgcolor="#F1F1F1">
         <table style="width:120;">
            <form method="post" action="http://huhnau.hu.funpic.de/phpwork/shoutboxx.php?action=add">
            <tr><td align="center" style="font-family:verdana; font-size:11px;"><strong>Shoutbox</strong></td></tr>
            <tr>
               <td>
                  <div style="border:1px #800000 solid; font-family:verdana; font-size:11px; height:150; overflow:auto; padding:3px; width:100%;">
                     <div align="center">Seite: <select onchange="javascript: location.href='/phpwork/shoutboxx.php?&shoutbox_page='+this.value;" style="font-family: verdana; font-size: 10px;">

<option value="1"selected="selected">1</option>
</select></div><hr size="1">
<strong>asdafd</strong>
Nachricht                  </div>
               </td>
            </tr>
            <tr>
               <td>
                  <input type="text" name="name" value="Name" style="border:1px #800000 solid; font-family:verdana; font-size:11px; width:100%;" onfocus="this.select();">

                  <input type="text" name="email" value="Email" style="border:1px #800000 solid; font-family:verdana; font-size:11px; width:100%;" onfocus="this.select();">
                  <input type="text" name="message" value="Nachricht" style="border:1px #800000 solid; font-family:verdana; font-size:11px;   width:100%;" onfocus="this.select();">
               </td>
            </tr>
            <tr>
               <td align="center">
                  <input type="submit" value="Absenden" style="border:1px #800000 solid; font-family:verdana; font-size:11px;">
                  <a href="http://www.netz2k.de" target="_blank" style="font-family: verdana; font-size: 9px;">Script by Netz2K.de</a>

               </td>
            </tr>
         </table>

gesagt getan!
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
procedure TForm1.Button1Click(Sender: TObject);
var
  SL: TStringList;
begin
  //nur zum testen eingeführt
 { SL := TStringList.Create;
  try
    SL.Add('name=huhu');
    SL.Add('email=Email');
    SL.Add('message=Hallo');
    memo1.Lines.Text:=idHTTP1.Post('http://huhnau.hu.funpic.de/phpwork/shoutboxx.php?action=add', SL);
  finally
    SL.Free;
  end; }

//das wesentliche
memo1.Text:=idhttp1.Get('http://huhnau.hu.funpic.de/phpwork/shoutboxx.php?action=add&name=bla&email=Email&message=Halloess');
end;

eigentlich müsste es ja funktionieren, aber irgendwie tut es nicht...ich versteh es net.
wahrscheinlich hab ich irgend eine kleinigkeit vergessen und finde diese nicht nrggghhh :evil:
ich dank euch schon mal!
mfg huhn

_________________
Quod Erat Demonstrandum-Was zu beweisen war! *THX to Chrissivo!*
Grendel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 443

Gentoo Linux, MacOS X, Win 2000
D5 Ent, D7 Ent, Lazarus, Anjuta, MonoDevelop
BeitragVerfasst: Di 16.08.05 14:58 
user profile iconhuhn hat folgendes geschrieben:
Dies ist die seite die ich lade und auf der ich was posten will ohne die post-methode

Also so wie ich das sehe musst Du mit POST arbeiten.
Denn hier <form method="post" steht eindeutig, daß das Formular mit post arbeitet. Wenn es nun die Daten aus POST auszulesen versucht, die Daten aber in GET stehen wird das nicht funktionieren.

Bis neulich ...
huhn Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 272
Erhaltene Danke: 1

WIN XP
D7Pers
BeitragVerfasst: Di 16.08.05 15:01 
aber ich hab schon öfters variablen und ähnliches mit get übertragen und ich glaub au en paar mal post methoden mit get

_________________
Quod Erat Demonstrandum-Was zu beweisen war! *THX to Chrissivo!*
Grendel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 443

Gentoo Linux, MacOS X, Win 2000
D5 Ent, D7 Ent, Lazarus, Anjuta, MonoDevelop
BeitragVerfasst: Di 16.08.05 15:34 
user profile iconhuhn hat folgendes geschrieben:
aber ich hab schon öfters variablen und ähnliches mit get übertragen und ich glaub au en paar mal post methoden mit get

Es kann sein, daß das verarbeitende Script schlecht gemacht ist und nicht zwischen POST und GET unterscheidet (z.B. PHP-Script mit register_globals = on).
In solchen Fällen kann auch die Übergabe per GET funktionieren aber drauf verlassen kannst Du dich nicht.

Bis neulich ...
huhn Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 272
Erhaltene Danke: 1

WIN XP
D7Pers
BeitragVerfasst: Di 16.08.05 15:48 
ok thx hab au no ne andere methode gefunden aber erstmal ist glaub ich die frage geklärt!
mfg huhn

_________________
Quod Erat Demonstrandum-Was zu beweisen war! *THX to Chrissivo!*