POST Networking

Blitz3D Forums/Blitz3D Beginners Area/POST Networking

AJ00200(Posted 2009) [#1]
How would you send a POST value to a PHP Script?


xtremegamr(Posted 2009) [#2]
Here's some quick and dirty code:



As you can see, you just send the request like usual, except you use the
POST method instead of GET. Then, you send a blank line, and your parameters.

Here's some more info on the HTTP Protocol


AJ00200(Posted 2009) [#3]
Thanks a lot!


zortzblatz(Posted 2009) [#4]
I hope this question doesn't hijack this thread (assuming that AJ00200 isn't done with it) but how would one go about writing a php program that can listen and speak with a blitz3d program?

Is there a tutorial on the subject anywhere?


jfk EO-11110(Posted 2009) [#5]
What I usually do is: I have got an apache server running on my machine, locally, with PHP and mySql support. First I need a PHP-Page running in a Browser window.
Then I take a HTTP Client written in Blitz and try to emulate the browser.
(I've posted a POST example in the Code Archives).

To find out what the browser actually has to do/send, I also use a HTTP Server written in Blitz. This way I can see plain text of what eg. Firefox is sending to the server.

Or you may of course use a packet sniffer instead and simply read the content of the communication.

Basicly all Protocols and Transfer Technologies used in the Web are defined in a RFC that can be found at http://www.iana.org/protocols/. ( iana.org is the real deal, the origin of the whole stuff)
You may also browse the w3 consortiums server: http://www.w3.org/

Of course, it takes some time to read trough all those RFCs and find the thing you want to know. So sometimes it's easier to hack the required information, as explained at the beginning of this post, using a fake browser and a fake server.

And of course there are also many open source projects that may already do what you want, or contain the infos you need.


AJ00200(Posted 2009) [#6]
Thaks JFK


Beaker(Posted 2009) [#7]
I always found Etna useful:
http://repeatuntil.online.fr/Etna/