PHP and ASP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chameleon
Forum Newbie
Posts: 1
Joined: Thu Jun 26, 2003 11:29 pm

PHP and ASP

Post 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
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post by AVATAr »

you can rewrite but you can't use "cross session variables between php and asp"
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post 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
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post 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
elToro
Forum Newbie
Posts: 9
Joined: Fri Jun 27, 2003 10:31 am

Post by elToro »

Perhaps you could write the session variables to a cookies in the ASP, and then read the cookie with PHP.
Post Reply