HTTP POST method

Everything else that doesn't fall into one of the other PB categories.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tinman.

Hi,

Has anyone got any good links about the format of sending a POST method to an HTTP server? I've been searching for a long time but cannot find anything good (my program seems to work OK with Apache and a test script I have but causes a VBScript error on a real server).

Thanks.

(Update: it's to send HTML form data to the server)
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Asked nearly a year ago and I'm searching for exactly the same thing. There is libcurl which I've had a *little* success with but it's really hard to work with and to do SSL I'll have to include about 1.5 megs worth of DLLs..

Has anyone come up with any magic since 2002? I need to POST a form to a web page over SSL and read the results..
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post by tinman »

Wow, didn't realise such old posts still existed ;)
Karbon wrote:Has anyone come up with any magic since 2002? I need to POST a form to a web page over SSL and read the results..
I ended up writing some HTTP transfer routines which can handle GET and POST, plain and chunked data transfer and support proper events. They don't do resume and I've never looked at SSL.

I guess I could post them here if you want a look. Maybe. If you ask *real* nice ;p
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

Hey Tinman,

would be really interested to see that code :)

would you be so kind to post it,PLEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAAAAAAAAAAAAAAAAAAASSSSSSSSSSSSSEEEEEEEEEEEEEEEEE :D :?:
Thanks in advance
regards,
benny!
-
pe0ple ar3 str4nge!!!
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Yes tinman, see me begging over here :-)

HTTP is one step closer than I am now to HTTPS!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

I'm also thinking that there might be a way to do this with a webgadget and some javascript but I'm not positive yet. It's a total hack but I'll post it if I can get something working.
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post by tinman »

OK, rather than post it here, I've put it on my homepage. It's a collection of source files so not very well suited to posting on the forum.

The http_transfer.pb file is the main one you need to include to use it.

The file france_insee_data.pb is a piece of code I've used it with, but that probably won't run as I never checked that all the files are there - it's only there to show you how to use the HTTP stuff.

Note that there still seems to be some problems. Mainly that I found afer transferring a lot of files it would die without bumping the buffer size up a lot. There is no resume support. There is no pipelining support.

http://www.david-mcminn.co.uk
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

@Tinman:
Thank you very much ... i am going to download it immediately!
regards,
benny!
-
pe0ple ar3 str4nge!!!
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

I wrote some POST functionality for atomic webserver once.
viewtopic.php?t=2229
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Thanks guys!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Dreglor
Enthusiast
Enthusiast
Posts: 759
Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA

Post by Dreglor »

hmm your home pages does not exist as my browser says...
misspelled the link?
~Dreglor
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post by tinman »

Dreglor wrote:hmm your home pages does not exist as my browser says...
misspelled the link?
Me? No, it definately exists and the link is correct. I noticed that it was dead a few days ago, perhaps my hosting company had more problems when you tried. But I just checked now and it really does exist :)
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Hey Tinman, 8th December 2003 doesn't exist yet. :)
Look at your web page :arrow:
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post by tinman »

Psychophanta wrote:Hey Tinman, 8th December 2003 doesn't exist yet. :)
Look at your web page :arrow:
Errr, that's the next planned update. Honest ;)
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
Post Reply