Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting VBS Variables with PHP?

Status
Not open for further replies.

steverbs

Programmer
Joined
Jul 17, 2003
Messages
253
Location
GB
Hey all.

I'm in need of a little help from someone with experience in both ASP (VBS) and PHP. We have been developing an application using Macromedia Dreamweaver and ASP (VBScript), which uses VB sessions. The thing is, there are a few components which required the functionality of PHP. Now we need to find a way of getting the VB session variables from within the PHP scripts.

Any ideas?

Regards.

Steve.
 
Question:

1. How is the combination of these technolgies planned? Several scripts posting to each other?

2. How is the VB session information stored?

Thoughts:
a) You can write the serialized variables to a file and retrieve it with PHP and desrialize - these are like shared session data files.

b) database based session data: write to the db in ASP and read in PHP

c) infuse the values into the server environment and read them like that into PHP.
 
Cheers for the reply. The thing is, I'm not exactly sure where the VB session variables are being stored. As I have said, the VB pages were created with Dreamweaver and the following code is responsible for the sessions:

MM_authorizedUsers=""
MM_authFailedURL="index.asp"
MM_grantAccess=false
If Session(&quot;MM_Username&quot;) <> &quot;&quot; Then
If (true Or CStr(Session(&quot;MM_UserAuthorization&quot;))=&quot;&quot;) Or _
(InStr(1,MM_authorizedUsers,Session(&quot;MM_UserAuthorization&quot;))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = &quot;?&quot;
If (InStr(1,MM_authFailedURL,&quot;?&quot;) >= 1) Then MM_qsChar = &quot;&&quot;
MM_referrer = Request.ServerVariables(&quot;URL&quot;)
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & &quot;?&quot; & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & &quot;accessdenied=&quot; & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If

The ASP page that uses this session code also has a form that passes information, including a file, to a php script that performs various operations - some of which could be used maliciously - before redirecting to the original ASP page. So I am wanting to find how to access the session variables, created with the above code, from within the php script. We have considered designing the session system ourselves, but this is a small, non-critical application that is nearing completion, and so that course of action is really outside of the scope of the project.

Thanks for your help.

Steve.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top