-1

I have a MySQL database with a PHP scripts written to exploit the database. I'm writing a program in C++ and want to access the PHP classes to power the application. How should I go about doing this?

If I have a PHP function I want to get a return value from, how do I do this in C++? Is it even possible?

5
  • 3
    possible duplicate of Calling a PHP script from a C++ Program Commented Nov 21, 2013 at 20:06
  • Use HTTP POST and GET methods. Libcurl would be my suggestion. Commented Nov 21, 2013 at 20:07
  • When using the PHP API inside a PHP script, I used cURL. Is it a similar process? Commented Nov 21, 2013 at 20:08
  • @kingkero - the duplicate you claim isn't relevant as I'm after a more specific way to use get and post http headers... Commented Nov 21, 2013 at 20:31
  • HTTP with Qt: QNetworkAccessManager Commented Nov 22, 2013 at 7:00

1 Answer 1

0

curl is a general one for C++. If you are using Qt then I would suggest QNetworkAccessManager class. It has functions get and post to handle HTTP GET/POST request.

Sign up to request clarification or add additional context in comments.

1 Comment

Ahhh perfect! So I could use those functions to interact with the PHP API using get and post :) that's the question answered right there!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.