Connecting Tech Pros Worldwide Forums | Help | Site Map

Getting session id of ASP pages from PHP.

ImOk
Guest
 
Posts: n/a
#1: Jul 1 '06
I want to develop some code in PHP that is part of an ASP application.

I am wondering if there is anyway to get the session ID of an ASP page
(or any other scripting language) from PHP.

I assume that session id's are kept as cookies on the user's desktop.
If that's the case there should be some way of retrieving them.

Has anyone ever accomplished such a linkage?

Thanks


Rafe Culpin
Guest
 
Posts: n/a
#2: Jul 1 '06

re: Getting session id of ASP pages from PHP.


In article <1151776122.732440.105560@m79g2000cwm.googlegroups .com>,
j_macaroni@yahoo.com (ImOk) wrote:
[color=blue]
> I am wondering if there is anyway to get the session ID of an ASP page
> (or any other scripting language) from PHP.
>
> I assume that session id's are kept as cookies on the user's desktop.
> If that's the case there should be some way of retrieving them.
>
> Has anyone ever accomplished such a linkage?[/color]

The following worked in perl for ASP 1 - they might have changed the
cookie format since then.

foreach $_ (split /; /, $ENV{'HTTP_COOKIE'}) {
$session_id = $1 if /ASPSESSIONID.{8}=(.{24})/;
}

--
To reply email rafe, at the address cix co uk
ImOk
Guest
 
Posts: n/a
#3: Jul 2 '06

re: Getting session id of ASP pages from PHP.


Looks reasonable (except for that perl gunk :)

Care to translate.

Thanks

Rafe Culpin wrote:
Quote:
In article <1151776122.732440.105560@m79g2000cwm.googlegroups .com>,
j_macaroni@yahoo.com (ImOk) wrote:
>
Quote:
I am wondering if there is anyway to get the session ID of an ASP page
(or any other scripting language) from PHP.

I assume that session id's are kept as cookies on the user's desktop.
If that's the case there should be some way of retrieving them.

Has anyone ever accomplished such a linkage?
>
The following worked in perl for ASP 1 - they might have changed the
cookie format since then.
>
foreach $_ (split /; /, $ENV{'HTTP_COOKIE'}) {
$session_id = $1 if /ASPSESSIONID.{8}=(.{24})/;
}
>
--
To reply email rafe, at the address cix co uk
Rafe Culpin
Guest
 
Posts: n/a
#4: Jul 2 '06

re: Getting session id of ASP pages from PHP.


In article <1151853378.303819.40830@j8g2000cwa.googlegroups.c om>,
j_macaroni@yahoo.com (ImOk) wrote:

Quote:
Looks reasonable (except for that perl gunk :)
>
Care to translate.
I wrote it years back, so I'd have to work through it all again, and I
don't have that set-up at the moment. You should be able to translate into
PHP's perl compatible regexps, but you'll need to check the current cookie
format.

--
To reply email rafe, at the address cix co uk
Closed Thread