Connecting Tech Pros Worldwide Help | Site Map

Getting session id of ASP pages from PHP.

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 1st, 2006, 05:45 PM
ImOk
Guest
 
Posts: n/a
Default Getting session id of ASP pages from PHP.

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, 07:25 PM
Rafe Culpin
Guest
 
Posts: n/a
Default 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, 03:15 PM
ImOk
Guest
 
Posts: n/a
Default 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, 05:15 PM
Rafe Culpin
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.