I’ve been asked to develop a centralised control panel that allows website owners to login and control their content.
All these sites are controlled from this one control panel, with styles stored on each website domain. The templates are also the same, so they would be stored on the control panel domain as well. The websites and control panel will be stored on the same server, however I’d like to be prepared for any eventuality and allow it to communicate with sites on other servers if the time arises.
The control panel isn’t huge, but it will be modular, using permission controls and new features will be required over time. I’d appreciate any advice on how I could build a control panel that can send data to another website.
The only experience I’ve had with this is with a system that loaded templates from a core subdomain to each website using file_get_contents() function (note. all sites were on same server). This seems like a disaster waiting to happen though.
I’m assuming that these sites have a MySQL Database behind them.
Well, with PHP you can connect to multiple MySQL databases at a time. A possible solution could be to store the MySQL database connection settings for a certain site along with the user account. That way when the user logs in, PHP can get those connection settings and connect to their MySQL server. By doing that, you can make modifications to that site through the MySQL server.
As for the file-based stuff - well you could use PHP’s FTP capabilities to make those changes?
I think it is something like blog hosting, like wordpress or livejournal.
So, the term “site” become virtual, and actually we have just one site with one database with just different user accounts. Nothing complicate or difficult.
Speaking to the client, they haven’t decided who the hosting provider is, so I’m not sure what the database limitations are yet. Their website projections over time are quite high, yet their initial budget is low, so the application will be restrictive at first, but if I can design the architecture right first-time then it’ll enhance the sites with every server upgrade/migration. With that in mind, it may have to work from single database initially then migrate to multi-database architecture when server is changed, which complicates things.
Had thought about running them all from one database, with single table tracking site URLs/accounts, then blog table (for example) using siteURL/ID to identify which site to display on. Migration to multi-database structure could then be relatively straightforward - transfering site ID table to own database, linking unique site IDs to new database names then extracting records by ID to relevant database.
Initially it is a blog site, although different features are available. In other words, while every site will be running from the same system, each will be running on package 1, package 2 or package 3 - each package having different features. Therefore the rate of expansion will differ depending on the package they are on (package 1 for example has no blog at all, just static pages with content editable from control panel).
Future features being talked about are a calendar booking and payment system, which would be bespoke.
I’m building something very similar supporting multiple sites which share a single database and this is how it is being done. There is a single table that is responsible for storing all the sites and entities belonging to those sites use a foreign key to link to their appropriate site.
I don’t have any experience with web services, nor know much about them. I’ve heard of SOAP (programming, not cleaning agent), is that the same thing? Any suggestions on any good ‘idiots guides to web services’ tutorials?