FormsAuthentication to PHP

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi guys and gals!

I posted a message over at comp.lang.php/alt.php, but if anyone in here
knows how to get around this one, do let me know....

And instead of repeating myself, here's my post:

Kim André Akerø
(remove NOSPAM to contact me directly)

Re: FormsAuthentication to PHP

Kim André Akerø wrote:

Quoted text here. Click to load it

Two words: web service.

Firstly, in ASP, in some private area your visitors don't really need to
care about, create an ASP script that does roughly this:

    // pseudo-code -- my ASP is very rusty
    String encryptedcookie = Request.Query("ec");
    String cookie = AspFunctionToDecryptIt(encryptedcookie);

Now, say that ASP script is located at "http://localhost/_priv/cookie.asp".

Your PHP script can now call that ASP script to do the decryption:

    $encryptedcookie = $_COOKIE["FormsAuth"];
    $aspscript = "http://localhost/_priv/cookie.asp";
    $cookie = file("?ec=");
    $cookie = $cookie[0];  # only interested in first part of array


Toby A Inkster BSc (Hons) ARCS
Contact Me  ~

Site Timeline