This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Webmaster forum > September 2006 > FormsAuthentication to PHP
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
FormsAuthentication to PHP
|
|
| Kim André Akerø 2006-09-24, 6:59 pm |
| 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:
http://message-id.net/%3C4ncosuF9m4...dividual.net%3E
--
Kim André Akerø
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
| |
| Toby Inkster 2006-09-24, 7:00 pm |
| Kim André Akerø wrote:
> http://message-id.net/%3C4ncosuF9m4...dividual.net%3E
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);
Response.write(cookie);
%>
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:
<?php
$encryptedcookie = $_COOKIE["FormsAuth"];
$aspscript = "http://localhost/_priv/cookie.asp";
$cookie = file("{$aspscript}?ec={$encryptedcookie}");
$cookie = $cookie[0]; # only interested in first part of array
?>
Magic.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|