hi all,

i have 3 php websites , each one requires login (same username+password for all of them)
they run on apache virtual hosts on the same machine.

i want to centralise login on a single page by adding 3 forms on a page so that when i click on a button the logins are submitted to the respective websites.

can anyone advise if this is possible ??

please advise on this.thanks.

Recommended Answers

All 9 Replies

Just an idea, but you could have the forms submit to your first PHP login processing file, then pass the rest of the info along to the other login processing files with curl from your first script.

Why don't you just use cookies for when they login sites, retrieve cookie data and verify based on last login (in ur db) and expiry of cookie

each of the 3 web applications use their own session management.
one of them is RoundCube webmail which uses cookies to store the sessionID.
i wanted to modify it so that it does not use cookies to store the session id but adds it on the url.
but the code looks difficult ... and will take some time :(

in this way i could use curl to log on behalf of a user then get the sessionID.
once i get sessionID i can use it on a real browser.

the other 2 web applications i have are phpBB3 & MediaWiki

really try to avoid posting data through the URL.
remember guys that this can be bookmarked.
and the session id can change each time and this compromises security if an old one and new one get mixed up.
and you can use cookies and sessions together.
but alot of people block cookies.
try to set up a system where it uses cookies, and then goes to sessions if cookies are disabled,

This maybe quite late answer, but its possible to achieve with mixture of headers(301,302), pass encrypted data using the GET array. If you add CURL and smart use of JSON you may be also able to register the users on all sites at the same time.

why don't use a list box? if you use list to give the user where they want to logon to and use if statement with redirect function to redirect to different web site address.

let me know if you need guild on how to code it ok

Member Avatar for diafol

2 year old thread. I doubt the OP is going to benefit from this. However if you feel the need to post some nifty solutions with code, please do so. This thread is well and truly dead from the OP's point of view, but others may benefit from your solutions.

So, we have some sugegstions for headers, cURL/JSON and list box redirects. Interesting.

One thing to bear in mind - overwriting sessions. Logging in members who are actually already logged in - session expiry may be different on each site.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.