Connecting Tech Pros Worldwide Help | Site Map

Getting session id of ASP pages from PHP.

  #1  
Old July 1st, 2006, 06:45 PM
ImOk
Guest
 
Posts: n/a
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

  #2  
Old July 1st, 2006, 08:25 PM
Rafe Culpin
Guest
 
Posts: n/a

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
  #3  
Old July 2nd, 2006, 04:15 PM
ImOk
Guest
 
Posts: n/a

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
  #4  
Old July 2nd, 2006, 06:15 PM
Rafe Culpin
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Links - VB - ASP.NET IloveTacos answers 10 October 31st, 2008 04:49 PM
"error_reporting" setting not being recognized in my php.ini file laredotornado@zipmail.com answers 1 October 3rd, 2006 03:25 PM
asp question about post vars glenn answers 10 November 19th, 2005 06:01 AM