Calling a php file from openframeworks

I have to create an app where users can send Twitter messages from OF.
I´ve searched for addons but most of them doesn´t seem to work on Windows. So i decided to create a php file hosted on a localhsot or online server where i could send de same Get or POst vars from inside OF.

How can i call the php file from inside of?. Using OfhttpRequest?.

Any help would be much appreciated.


I think it might be simpler to make your GET and POST requests from your app using native C++ code than to run an external script. Here’s a simple (untested) example. You could certainly run the php script from your app, but it might be unnecessarily complicated to get and parse return values.

Edit: Here’s another example using a library. Just google around, I’m sure you’ll find something that works.

Thank you for your reply.
I solved it using ofHttpUtils from arturo castro and TwitterExchangeApi on the php side and it worked perfectly (Y).