Forum Moderators: coopster

Message Too Old, No Replies

2 sites sharing customer data

2 separate site needign to share registration and login info

         

fwordboy

9:33 am on Jun 26, 2006 (gmt 0)

10+ Year Member



First of all is it possible for two separate website to automatically share customer registration data and login status on 2 separate servers with two different domain names one with HTTPS and one with just HTTP?

If it's possible what's the best way to do this?

the details:

server 1:
HTTPS
Apache
PHP 5
SQL Server

server 2:
HTTP
Apache
PHP 4
MySQL

alce

3:38 pm on Jun 26, 2006 (gmt 0)

10+ Year Member



I believe it is possible.

What you need to do is to point one script to connect to a remote host and access the database.

When connecting to mysql you use:

mysql_connect('localhost', 'username', 'password');

So basically you setup one database and access it locally by one script and remotely by the other:

mysql_connect('someremotehost', 'username' , 'password');

fwordboy

9:24 am on Jun 27, 2006 (gmt 0)

10+ Year Member



thanks alce but the sites both use different databases so I'm not sure how easy that will be.

coopster

10:03 am on Jun 27, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Why not install the database server on the other server? It would make things much easier, and much safer.

fwordboy

1:39 pm on Jun 27, 2006 (gmt 0)

10+ Year Member



For reasons beyond my control it isn't an option. I'll elaborate.

A third party runs our ecommerce site which collects user info including emails, passwords and addresses, etc.

We also have a legacy site that runs competitions and people can enter their details on this site which we use for marketing purposes.

If someone signs up to one it would be best if they were signed up automatically to the other site. If they log- in to one and move across it would be best if they were still logged-in. Apart from the URL changing the customer should never be aware that theyr'r moving from site to site.

It isn't feasible to end the competitions - much as I'd like. It also isn't feasible for us to simply send all our customer data to the third party running our ecommerce site with nothing in return plus that wouldn't help the logging in issue

eelixduppy

5:05 pm on Jun 27, 2006 (gmt 0)



>>>If someone signs up to one it would be best if they were signed up automatically to the other site.

If you do not have access to the third-party host then you won't be able to implement this yourself, but maybe have them do it for you, or give you access to the host to do it.

mcavic

5:37 pm on Jun 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could use http or https to move data back and forth. For example, when someone signs up, the server they're on could send an HTTP POST to the other server with all of their data, which that server would then save to its database.

To make moving from one server to the other transparent to the user, you'd need to set two cookies when they log in -- one for each server. But that would be a third-party cookie, which might be blocked by the browser.

Worst-case scenario, though, they'd have to log in twice.

fwordboy

3:30 pm on Jun 28, 2006 (gmt 0)

10+ Year Member



Thanks for the advice everyone.

I think the main way to solve this is to lobby for change and instead of having people logging in to enter competitions on a different website, merely have them enter their details for each competition they enter (and to make this work, really cut down on the amount of details we ask for).

I don't know about you but if I enter a competition on a website I don't expect to be signing up for a user account complete with password - that makes little sense to me and now I've thought about it a little, I've decided a rethink is necessary.

jatar_k

5:07 pm on Jun 28, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I agree absolutely with everything you said in your last post

it really won't work very well the way it is now and it will never be seamless enough