PDA

View Full Version : Parsing login data from ASPX to PHP ?


Ulysses
10-15-2008, 11:38 AM
Is there any way, user login info (username & password) can be parsed from a windows ASPX script to a PHP script on a different server???

We have a situation where users logging into an ASPX script site, are given a link to content on a Linux site with PHP scrpit, and we don't want them to login twice - once to each script.

Thanks

Michael

hinch
10-15-2008, 11:50 AM
have a background.aspx page that spits out username/password.

put your php page to check if referrer came from your initial aspx script if it does then it retrieves (fopen should do it) the background.aspx page and does an auto login.

or you could just put a form and button on the aspx page instead of a direct link to the file. use hidden fields for username,password,file requested. have it post directly to the php login form and edit the login success part of the php script so that it redirects to the file requested.

or you could have the aspx page just load the file directly from the server www.xx.ss/imafile.doc etc

there's actually a million and one ways of doing it if the files are stored in a db then you could write a php web service and have the aspx consume it (very simple in .net) take your pick

Ulysses
10-15-2008, 11:56 AM
Thanks hinch

The first option sounds appropriate as the PHP site is a fully featured cart, rather than just access file downloads.

But we'll have to periodically sync user data between the servers as well won't we?

Michael

hinch
10-15-2008, 12:35 PM
you could just edit your php site to pull its userdata from the aspx site DB instead of maintaining 2 seperate db's hell you could merge both db's completely into a single big one.

but if you absolubtly have to maintain separate db's then yes you'll have to do a perodic db sync. recommend easiest way is a cron'd php script to do it or if you got c# winapp (not web app) coders handy a simple console script you can use the windows scheduler to execute. both scripts will be fundementally the same just means that one of the 2 db's (depending on which way you do it) will require remote access enabling for it.

again this could be accomplished by using consumed web services though afterall if your using sql server you can create a web service directly from the db not front end coded needed then its just a case of cronning an xml read script, yet another option of dozen different ways of doing it just a case of picking the right one and one YOU can maintain.

Ulysses
10-16-2008, 10:21 AM
Thanks hinch

That's really helpful. Once you see the big picture all the detail falls into place more easily.

Thanks

hinch
10-16-2008, 10:51 AM
no problems I miss working on big distributed enterprise stuff like that :( I just tend to potter around doing small websites etc so getting stuck into something like that would be fun