Send data from php on webserver to c++ app on local machine
Posted on 2005-03-10
I'm working on a project that needs to get data from a php script on a webserver and send it to a c++ app that is running on a local hardrive (not same computer as webserver). I know there are plenty of resources on wiritng sockets in php and c, however I need help understanding the specifics of making this work (if it is possible). First, the machine runninig the script will be connected to the internet of course. I know how to find the ip address of my pc, but I cannot seem to create a connection from a php script to it. Are there settings I need to alter or could there be a block from the network i'm connected to? How do I choose a port and find out if it is open to send and receive on both ends?
My hack for the moment is to save the data i need to a file on the server and have the c app check that file. It does not seem to make sense to do it this way when I do not need to save the data but just transmit it. I also want to have the c app just listening for incoming data, not actively accessing a file ona server.
Thanks for any help!