Recent

Author Topic: How to do to send parameters to page web ?  (Read 5775 times)

rodrigo

  • Guest
How to do to send parameters to page web ?
« on: November 17, 2005, 12:48:27 pm »
How communicate with page web and call it with parameters ? I use the package indy but when try return error: number 22 parameters invalids. Any Idea ?

Or in portuguese:

Como faço para chamar uma página da internet enviando parâmetros para ela e é claro retornando seu conteúdo seja "string" ou "tstring". Tentei utilizar o indy porém o que recebo de erro é erro 22 de parâmetro. Alguém tem alguma idéia ?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2506
RE: How to do to send parameters to page web ?
« Reply #1 on: November 18, 2005, 11:47:29 am »
normally you pass parameters after a "?" like:
Code: [Select]
index.php?name=PNphpBB2&file=viewtopic&p=6787#6787
The split up in params depends on the package/components/clesses/functions you use.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

rodrigo

  • Guest
I write it.
« Reply #2 on: November 18, 2005, 01:31:23 pm »
I write it using TIdHTTP(name:IdHTTP) to send:
...
AIdMultiPart:=TIdMultiPartForm.Create;
AIdMultiPart.AddFormField('test','123');
AReturn:=IdHTTP.Post(AURL,AIdMultiPart);
...

Is It what I try compile and result in error.
What I do wrong ?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2506
RE: I write it.
« Reply #3 on: November 21, 2005, 02:42:00 pm »
Look in the ID documentation on what idHTTP.Post expects as parameters.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker