Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Mar : Re: Post idhttp object with multiform

www.cryer.info
Managed Newsgroup Archive

Re: Post idhttp object with multiform

Subject:Re: Post idhttp object with multiform
Posted by:"Axel" (borland.public.delphi.internet.winso..@newsgroups.borland.com)
Date:Wed, 22 Mar 2006 11:29:31

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> ha scritto nel messaggio
news:44205667$1@newsgroups.borland.com...
>
> "Axel" <borland.public.delphi.internet.winsock@newsgroups.borland.com>
> wrote
> in message news:441fe5a3$1@newsgroups.borland.com...
>
>> the lines you added,
>> >                FormData.AddFormField('INTERACTIVE', '1');
>> >                FormData.AddFormField('CMDLOGIN', 'Logon');
>> are only for interactive authentication, with the browser.
>
> Given the HTML you showed earlier, you MUST submit those two extra fields.
> That is what real browsers are doing, since those fields are part of the
> form.  The fact that they are declared to be hidden is completely
> irrelevant.  That just means that the user does not see them, but the
> browser does, and they are sent to the server as-is.

I have tried that fields some days ago yet, but nothing.
The code below doesn't contain the field "INTERACTIVE" and contain the field
CMD (button) to post the form to which i change the name and the id. It
works. See the xml code of the positive response.

Either the help (and helpdesk) of this service say that it need only 3
fields.
I think my problem is another.... and i don't know where!!


<FORM name=TESTFORM action=https://www.postel.it/PTLTOKEN/logon method=post>
  <TR>
    <TD>USRNAME</TD>
    <TD><INPUT id=USRNAME type=edit value=1234567 name=USRNAME></TD></TR>
  <TR>
    <TD>USRPWD</TD>
    <TD><INPUT id=USRPWD type=password value=PASSWORD name=USRPWD></TD></TR>
  <TR>
    <TD>PTLTOKENCTX</TD>
    <TD><INPUT id=PTLTOKENCTX type=edit value=UPLOAD
  name=PTLTOKENCTX></TD></TR>
    <TD><INPUT id=CMD onclick=this.form.submit(); type=button value=Logon
name=CMD>
    </TD></TR></FORM>
<HR>
</BODY></HTML>


Response:
  <?xml version="1.0" encoding="ISO-8859-1" ?>
- <XML>
- <TOKENENV>
  <PTLTOKEN>12345671143018428000UPLOAD</PTLTOKEN>
  <PTLTOKENCTX>UPLOAD</PTLTOKENCTX>
  <PTLDTTOKEN>2006-03-22T10:07:08</PTLDTTOKEN>
  <PTLUID>1234567</PTLUID>
  <PTLZID>Z0005370</PTLZID>
  <PTLEMAIL>mail@mail.it</PTLEMAIL>
  </TOKENENV>
  </XML>


Axel
>
>
> Gambit

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive