Page 1 of 1

PHP and ASP

Posted: Thu Jun 26, 2003 11:29 pm
by chameleon
I have a site that primarily uses asp pages and would like to incorporate the Vbulletin php portals into my website that requires logging in to view it... Since my whole login system is ASP I would like to be able use the following ASP code or equivalent PHP to check for athorization.

here is the the code that is used on my asp pages:

<%Response.Buffer = true
if session("memberlogged") = false then
Response.Redirect("default.asp")
end if
%>

What the above does is check to see if memberlogged is false and if not set it redirects back to login page(default.asp) this code is at the top of all my pages that require logging in.

Is there a way to rewrite this in PHP and be able to use the same "memberlogged" variable that was set within ASP?

Or some way I can incorporate asp within PHP

Posted: Fri Jun 27, 2003 8:18 am
by AVATAr
you can rewrite but you can't use "cross session variables between php and asp"

Posted: Fri Jun 27, 2003 8:19 am
by m3rajk
there's something i recall seeing somewhere when setting up php... not sure where.. check oreilly and such for "asp2php"

you might be able to convert everything to php

Posted: Fri Jun 27, 2003 8:28 am
by AVATAr
the convertion is possbile, what i thinkg is not possible is using asp session vars in php.. you can use some other solution.. like using a Db, text file, webservice.. etc

Posted: Fri Jun 27, 2003 10:31 am
by elToro
Perhaps you could write the session variables to a cookies in the ASP, and then read the cookie with PHP.