943,161 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 657
  • PHP RSS
Nov 22nd, 2009
0

one account for multiple sites

Expand Post »
how can i use a single account on my double sites.........either with cookies or any thing else...........!!

suppose i have http://www.mydomain.com and also
http://another.mydomain.com how can it use my single account with these both sites..........!!
Similar Threads
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
shishtawitch is offline Offline
55 posts
since Oct 2009
Nov 22nd, 2009
0
Re: one account for multiple sites
Cookies and sessions won't work because they are separate domains so I would suggest having them both read a common mysql database where user data will be stored so when a user logs into each, their preferences+passwords will still be the same as the other site. If however you do not want the user to have to log in twice then when a user logs in record their ip address in the user database and when the user visits the second site, the second site will check if the users ip is in the database and if it is it will send a cookie.

Sorry if that is too brief but there is so much to explain in so fewer words...
Sponsor
Featured Poster
Reputation Points: 410
Solved Threads: 258
Occupation: Genius
cwarn23 is offline Offline
3,003 posts
since Sep 2007
Nov 22nd, 2009
0
Re: one account for multiple sites
but how google handles a single account for multiple sites.......!!

if i store cookies................do you think this should work........!!
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
shishtawitch is offline Offline
55 posts
since Oct 2009
Nov 22nd, 2009
-2
Re: one account for multiple sites
Why did you start another thread when you posted a similar one and didn't bother replying to it?
Sponsor
Featured Poster
Reputation Points: 1041
Solved Threads: 935
Sarcastic Poster
ardav is offline Offline
6,620 posts
since Oct 2006
Nov 22nd, 2009
0
Re: one account for multiple sites
Quote ...
but how google handles a single account for multiple sites.......!!
Well cookies are designed to serve one domain only and google's login uses Java applets. So perhaps with googles login their Java applet could write to a file on the local system or something like that but this obviously doesn't suit your situation as you want php (The server side and not client side). Could you post your login script and show in a code box your database structure (column names and tables) as I shall help you code this multi site login.
Sponsor
Featured Poster
Reputation Points: 410
Solved Threads: 258
Occupation: Genius
cwarn23 is offline Offline
3,003 posts
since Sep 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: can any one find the error of ths pageing
Next Thread in PHP Forum Timeline: Snapshot of webpage using PHP





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC