Here’s the scenario:
Trying to implement a single sign on intranet system, but there are mixed PHP and .NET scripts, I am the PHP guy, but the cookie was created and encrypted by a .NET scripte, I can’t figure out how to decrypt the cookie using PHP, so I’m going to send the encrypted cookie to the .NET script for decryption, and then the .NET script will send me back the data with JSON, all using a https secured connection. I am trying to figure out what’s the best way to send the encrypted cookie over to the .NET script, can I just send the encrypted cookie as a string using “GET”?
If the encrypted cookie is a string and reasonably short, then just send it in a query string with GET. If it’s binary data, then
base64_encodeit first. If the data is long, you’ll probably want to do a POST instead.You’re probably better off, though, understanding how the .NET code decrypts things. Then you can write your own decryption in PHP.