Hi,

i would like to send data from a C++ application to a php script i am creating that will then put it into a mysql database after manipuating it a bit.

If you don't get what i mean then think of it like this. An HTML form can be used to post data to a php script, but instead of HTML i need c++.

Thanks,
Staggasaurarts

Recommended Answers

All 3 Replies

You can have either the php script execute a popen and read from the spawned process or have your C++ program spawn the PHP script and write to its standard input (or use any other formal IPC method). As far as setting environment variables (such as $_GET, $_POST and the like), I'm not so sure that will be so easy. You probably want to see how the browser is communicating with the php script and mimic that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.