[web] C++ to php comms

Started by
5 comments, last by Mathachew 16 years, 11 months ago
I am looking to update my website via a win32 executable so that my app talks to php script on my website and gets info back. Anybody got any good pointers on to do this?
ByronBoxes
Advertisement
The obvious way would be to have your win32 app put data in a database, and let the php site read from it when rendering a page.

You might have to be a bit more specific about how/when/what though. How do you want them to "talk" (Does the php app request info from the executable, or the other way around? When does it happen? When a php page is viewed or... some other time? And what info are we talking about?
Sorry - should have been more specific.

What I mean is that if I have a win32 app on my pc (i.e. not on the server) I need it to request info from a remote website that I have created and be able to send information to the remote web site via a PHP script on that remote web site.

So I guess what I am asking is if there is a simple solution that allows me to do a HTTP GET or POST from a win32 app.
ByronBoxes
I would recommend libcurl for that. I have used it myself and I really liked it.
or, you can get 'fancy' ('creative'), write a tcp server in php and use simple sockets in your c++ app :D
Q: How many programmers does it take to write a nice piece of software?A: MORE.
Quote:Original post by Paulius Maruska
I would recommend libcurl for that. I have used it myself and I really liked it.


Thanks - that looks good!
ByronBoxes
I second libcurl. I use it for a lot of data importing between a Windows/ASP 1.0/MSACCESS server to a PHP/Linux/PostgreSQL server. It r0x0rz j00r s0x0rz.

This topic is closed to new replies.

Advertisement