Question

For my college project i wish to make a website(PHP) that communicates(possibly in realtime) with a .Net desktop app(WPF) on the same server.Being a complete noob with php,i do not see any way to do this directly,any help in the right direction just to get me started?

EDIT: App is a WPF desktop app in C#

Was it helpful?

Solution

You might like to take a look at socket programming.

Let your C# app open a socket and listen to it.

Your PHP then connects to that socket, either requests information or sends information. And you are done. No need for polling.

Listen to the socket in an asynchronous way.

OTHER TIPS

One way you could do this without getting too far down the rabbit hole is to have the two applications share a database, either MS SQL or MySQL, whatever flavor you prefer. Then as data is created and modified by the web application in PHP, your .NET WPF application can see the updated data and do whatever it is that you want it to do. You can even use simple timer objects in your .NET app to scan the DB for changes if you want the updates to show without user input.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top