Douglas Hay wrote:
I know a browser would be horribly slow! I am using C++ Builder. I have
tried uploading a .TXT file to the site, and then a PHP script displays it
every 10 seconds. It works but it isn't ideal. Can you suggest a way to
get data to a PHP script without using a browser ? I don't have to have it
store into the MySQL database at this time.
Well basicly you need to write a small part of a normal browser in your
program, which should simulate normal HTTP POST by calling the php
script with parameters, where you would store the information you need
to transfer. If you have a large amount of parameters, you need to
simulate file upload.
Making a software with php that allows you to manually upload files is
pretty simple, see this page for examples and info:
http://fi.php.net/manual/fi/features.file-upload.php
Writing the C++ side could be triggier, unless you have a good library
functions to do the most of your work. You need to find information how
to use commit HTTP POST from your application and how you need to modify
the headers to be able to send file within the POST.
Anyway, since this doesn't have anything to do with MySQL this is
propably wrong group for this subject, and I'm not the best person to
tell you how to do it. Propably they know better in a group where you
can ask questions about how to program using your compiler.
(Don't try asking in comp.lang.c++ or comp.lang.learn.c-c++ since they
allow only questions about standard C++ and you can't do this with
standard C++)