I am looking into doing a project which would involve php and c#. What I need to do is from PHP the user can perform a certain task and once php has processed some information, this information needs to be sent to a c# application and c# can do some other work with the information provided.
The c# application would most likely work from the same server that the php web app is running from but it should work if they are on completely separate servers.
I guess I could send some XML from php to whatever IP address that the c# program running on, but have no idea how I would get php to do the sending and the c# app to do the listing for the data.
Any help would be greatly appreciated.d
SOAP
In one acronym, you have the solution to (almost) any interoperability problem in your life.
"Simply" define a web service running in a desktop application (it is possible but it’s not that straightforward) and instantiate a PHP SoapClient.
XML (pure)
Of course you can send direct XML input to your desktop application. This makes use of .NET Socket (
System.Net.Sockets) and PHP socket I/O (fsockopen). You can create your application-specific protocol and inject the XML data.Recommended if you are already very familiar with XML and comfortable to sockets.
Unrecommended if you want a higher level of reusability.