Recent

Author Topic: [Help] Simulate HTTP GET request  (Read 5686 times)

shonay

  • Full Member
  • ***
  • Posts: 169
[Help] Simulate HTTP GET request
« on: January 30, 2015, 04:56:09 pm »
This Question came up once, except that, no one answered the way it was supposed to be answered.

Suppose i have variables

Code: [Select]
var
   firstName : String;
   lastName : String;
   TelephoneNum : String;
   email : String;
   Sex: String;

Now i use Writeln(), ReadLn() to get the parameters and then have it sent to a php file which will in turn save to the database with $_GET (for those that know PHP)

now i want to send the parameters to a database, but i would like to use Wininet, instead of Indy or Winsock,  i need a working example, How do i go about it, I need a source code Please, someone help.
« Last Edit: January 30, 2015, 04:59:45 pm by shonay »
When the power of love overcomes the love of power, the world would know Peace

- Jimi Hendrix.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: [Help] Simulate HTTP GET request
« Reply #1 on: January 30, 2015, 05:30:13 pm »
You choose the hard path, so learn it the hard way as well:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa385438(v=vs.85).aspx

shonay

  • Full Member
  • ***
  • Posts: 169
Re: [Help] Simulate HTTP GET request
« Reply #2 on: January 30, 2015, 05:36:58 pm »
lol, @leledumbo, is indy a better way? i am supposing or better still you tell me a better way to fix this. just needed to learn how to send data via Wininet GET
When the power of love overcomes the love of power, the world would know Peace

- Jimi Hendrix.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: [Help] Simulate HTTP GET request
« Reply #3 on: January 30, 2015, 05:43:28 pm »
I never really use indy, only synapse and lnet, but nowadays I use the built-in fphttpclient from fcl-web to minimize 3rd party libraries so it reduces maintenance cost. It's so damn short and simple to use. I always use FPC trunk, so I can use the one liner code. The method is overloaded, look the one you're comfortable with to pass the GET parameters.

shonay

  • Full Member
  • ***
  • Posts: 169
Re: [Help] Simulate HTTP GET request
« Reply #4 on: January 30, 2015, 05:47:09 pm »
Hmm synapse and lnet , which can I use mainly, kind of confused here , which do you recommend
When the power of love overcomes the love of power, the world would know Peace

- Jimi Hendrix.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: [Help] Simulate HTTP GET request
« Reply #5 on: January 30, 2015, 05:50:43 pm »
Hmm synapse and lnet , which can I use mainly, kind of confused here , which do you recommend
Both, depending on use case and familiarity.

shonay

  • Full Member
  • ***
  • Posts: 169
Re: [Help] Simulate HTTP GET request
« Reply #6 on: January 30, 2015, 07:08:19 pm »
Couldn't find any useful tuts on this, I have ransacked the Internet, someone kindly help with wininet get pls
When the power of love overcomes the love of power, the world would know Peace

- Jimi Hendrix.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: [Help] Simulate HTTP GET request
« Reply #7 on: January 30, 2015, 07:13:43 pm »
The link to Microsoft site above should be sufficient. If not, you're in trouble of reading problem, which no tuts can ever solve.

BeniBela

  • Hero Member
  • *****
  • Posts: 905
    • homepage
Re: [Help] Simulate HTTP GET request
« Reply #8 on: January 30, 2015, 08:41:44 pm »
My Internet Tools use wininet

 

TinyPortal © 2005-2018