1

I have two websites, one is written in ASP.NET and the other in PHP. Have control over both sites.

ASP.NET site has its own login page ,but I need users to log in to ASP.NET site from PHP site as well.

I need to open ASP.NET site in a new window when users enter their information in the PHP site and click 'login'. behave completely independent from PHP site after they log in.

What is the best way to achieve this? I tried few examples written in curl but non of them work.

edit- They are in separate servers.

2 Answers 2

2

Couldn't you just use cookies to pass the login data from PHP to ASP.NET? Just set a cookie with their user ID or username.

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks , bit more information would be helpfull ,is this soemthing to use with PHP cURL?
No it has nothing to do with cURL. Just do a quick google search for "PHP cookies' and "ASP.NET cookies" and you will find everything you need to know. A cookie is just a small piece of data stored on the users computer.
Sorry I did a mistake in my question, They are in different servers and PHP site will not have access to the database of the ASP.NET site. Will this be a problem?
No that won't be a problem, you just have the specify which domain the cookie is for when setting/getting it.
Thanks for your help ,I'm really struggling with this issue still.All I need is a spam bot style login , there is no need to keep the user logged in the first site .
1

There are a common language between them is HTML5, You can Set LocalStorage in PHP page using JavaScript and check on it in Asp.net Page using JavaScript.

To know more about LocalStorage check this Link

2 Comments

This is a good future solution, but I think there are still some browsers being used that are not HTML 5 compatible.
Internet Explorer 7 and earlier versions, do not support web storage, this is from note from the link about compatible

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.