Link to home
Start Free TrialLog in
Avatar of Zeke Rich
Zeke RichFlag for United States of America

asked on

Website Cloning or Mirroring across multiple domains?

I have a website called globallistings.com (fictional), it is a business directory for multiple cities.
This search able online database is built in php , it only uses cookies and does not use sessions to share member info.

I want this website on various servers and share the same mysql data and user image uploads across multiple domains.

Domains For example use:

losangeleslistings.com;
chicagolistings.com;
newyorkcitylistings.com;

when the user goes to his city, he will see a custom website and graphics for his city that shares the same mysql data and user image uploads across all domains.

The main goal is to have many websites for different cities all sharing same mysql data and user image uploads, but each site having a unique design and domain name.

right now the images folder is located at:   ' globallistings.com /images ';
right now the mysql server is on localhost at globallistings.com

I understand myspace and facebook are also using this same system.

Question #1: What is the best way to accomplish this task?

Question #2: If main server is shut down "globallistings.com" can other websites still operate on separate servers?

Question #3: Do i clone the main mysql server or do i share the data from one mysql server across multiple domains?

Question #4: How do i handle user image uploads?

Thank you for your responses.

Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Well, that is four questions and we usually answer one question at a time, so I will take a crack at Q#2.

If you have a central server that has your images, and it goes away, your images go away.  So you would probably want to go with a content server like Akamai for this kind of application.

If I were going to answer Question #1, I think the answer would have to be given with an understanding of your budget.  In the development phase, I would just write programming that can be partitioned easily, and have all the domains resolve to the same IP address. If this starts to get the kind of traffic that Facebook carries, you will have different issues that are unrelated to PHP - ie, you will need to hire a lot of lawyers and accountants.

If you have more specific questions about any aspect of this, please post back here and I will try to drill down into the technical issues.

Best regards, ~Ray
Avatar of Zeke Rich

ASKER

Thank you for your response.
::Update:::
I was able to share the mysql database remotely among the different servers and i was also able to share the images.

I am using one mysql server and one folder and sharing the data remotely to the other servers.

The database is passing the information perfectly, but when the php is reading the image info width x height then passing the images it is too long of a delay taking up to 2 minutes to pass the data of one page that contains 30 images in a list.

Now i am considering using Curl with a cron job to update each database for localy for each server. Is this a efficient method? I will be grabbing the images and the data and storing them localy for each host via cron job set at one minute.

Any tips would be greatly apreciated.

@Ray_Paseur: my budget is $0 dollars.
Avatar of NerdsOfTech
Cron job to compare and update the tables for all of the segregated servers.
@NerdsOfTech

I know mysql has a function to mirror said server it is called 'Replication Server'. I dont know if this is possible , i am on shared hosting with "The planet (hostgator) " i will also need to mirror the folder that contains uploaded pics, unless i move the images to blob in mysql (not convenient)?

If i cannot use the Replication Server function of mysql because i am on shared with "The Planet Hosting" what is the best way to compare tables of my servers?

What is the best way to compare my images folder from each server?
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you, this pointed me in the right direction. Although i could not get the script to work i did write a similiar one using php manual. Thank you!
Thanks for the points - glad you've got it headed in the right direction.  Best, ~Ray