How to get C # to talk to a PHP session
It really depends on the details. Do you want a PHP application to run in your .NET environment? If I had a look at Phalanger but I don't think it will work the way you want it to.
You can also look at PHP on IIS , but that doesn't give you much information either.
As annakata mentioned, I am assuming that you are better off calling / redirecting to / from a PHP script to your ASP.NET website.
And I have a feeling it's not easy to do, so ... you're in luck;)
source to share
Well, you need to describe the snippets in more detail, but it won't be trivial if possible.
How about Response.Redirect to cart.php? inputparams = foo -> do work -> PHP redirect to thankyou.aspx? inputparams = bar
Can you use PHP as a service?
Or request PHP output as HTTPWebRequest?
source to share
There are several options here. While Java has more options for integration, especially for sessions, C # /. Net will likely rely on other communications products.
If it was background processing (like processing completed orders after checkout), this would probably be easier. However, you want to mix web applications. How and what you want to mix, they can (and probably will) do it quite hard - or at least in uncharted waters. PHP runs under Apache and .Net web applications under IIS.
You will have to go through a different technological level. Others have mentioned databases, but this is not a viable or efficient solution for storing sessions in real web applications.
Your best bet is probably memcached , for which there is at least one C # client library. Here is an example cross platform serialization using memcached .
beanstalkd can also be considered appropriate if you have background work processing. It is a distributed work queue process with multiple client libraries (e.g. Ruby, PHP, Perl, Erlang). I couldn't see the C # version, but it probably could be done. See Documentation.
I mention this because you might have a PHP request to work with beanstalkd, not a C # poll or a PHP session poll.
source to share