PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: John Messingham on October 03, 2004, 03:32:02 PM

Title: HTTP uploads
Post by: John Messingham on October 03, 2004, 03:32:02 PM
Hi,

I have a php script that is used to upload text files to a web server. I want to be able to connect to this script and pass the file(or file contents) to it from an application. Can anyone help me out on this. I have been looking at using winsock, but am unable to get the file part to work.

Many Thanks
Title: HTTP uploads
Post by: George Bleck on October 03, 2004, 11:28:38 PM
John,

It should not require anything near as complicated as WINSOCK, the PB built in TCP commands should work fine.

Here is an example to send stuff to a CGI script which should not be too much off from sending it to a PHP script.  It a simple matter decoding what is being posted.

Here is the link from the PowerBASIC site...

http://www.powerbasic.com/support/forums/Forum7/HTML/001029.html
Title: HTTP uploads
Post by: John Messingham on October 04, 2004, 05:45:09 AM
Many thanks, should I be able to adapt this code to run under PB for windows?
Title: HTTP uploads
Post by: George Bleck on October 04, 2004, 10:53:19 AM
Simply change the stdout to msgbox and the waitkey$ to a msgbox as well and it's done.
Title: HTTP uploads
Post by: John Messingham on October 05, 2004, 06:34:55 PM
Many Thanks George, I am moving on now.