Imagine 2 Applications running with different mysql-databases on the same server.
I need a way to exchange data between both applications.
One Application has no permission to access the database of the other application.
The exchange is only backend related (automatic stuff), no user interaction needed.
What would be the best and safest way to do this using php?
You could use named pipes – they’re well suited for interprocess communication.
http://my.opera.com/zomg/blog/2007/08/29/php-and-named-pipes
You can try it out in the interactive php:
Let that sit there waiting, then open another terminal:
Watch the “Hello World” show up in the first process. Make sure you put in the “\n”, as pipes are buffered and the newline signals to flush it.