Forum Moderators: open

Message Too Old, No Replies

How can I update multiple web sites.

multi web sites

         

peteruk040

8:13 pm on Nov 24, 2004 (gmt 0)

10+ Year Member



We have ten web sites world-wide, every time one of the web sites has a content update the other 9 have to be updated too. This procedure we have at the moment is lengthy and I was told we could make are life’s a lot easier if we where to use php.
Can someone please help me on this, is php the best option or is there a bester option.

MatthewHSE

11:37 pm on Nov 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are the sites hosted on the same hosting account and/or server and/or domain? Also, what kind of updates are you talking about here? Content? Navigation? Other?

The answers to those questions will help determine what might work for you.

peteruk040

12:12 am on Nov 26, 2004 (gmt 0)

10+ Year Member



Each site is on a different server and it's just content to update.

script_site

12:38 am on Nov 26, 2004 (gmt 0)

10+ Year Member



Thinking about it at a high level and assuming that you're using static pages, you need a templating system for each site. Then, you modify the content for each site, and fill in the blanks using the templates. Finally, you need a script to ftp the new pages up. You can automate most of it, and I'm sure that it can be done with PHP, but it doesn't sound trivial.

TheWhippinpost

12:29 pm on Nov 26, 2004 (gmt 0)

10+ Year Member



I'd say that you need an Apache or similar-based server able to perform cron jobs. You'll need a script (PHP - I presume - or Perl will do it) that will check a text, database or XML file (your choice)for new content, then go out and log-in and upload anything new into your other domains.

ASP will also do it but finding hosts that accomodate scheduled tasks might be a challenge.

rocknbil

4:09 pm on Nov 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



We do this in one of two ways:

mysql is designed to be connected to remotely.

If your site is dynamic - that is, the content is inserted into a template - you just have all your content stored in a mysql database on one of the sites and each of the ten pages connect to the master DB for content.

If your site is HTML - it requires some diddling around for security, because the the HTML pages need to be writeable. One of the ways you can do this is (via your scripting) chmod the file 777 just prior to overwrite, than back to read only after it's overwritten.

The process is the same as above, but you'll need to visit each of the sites and run an "update" script that connects to the database, grabs the content for a given page, inserts it into the template, then writes it to the HTML page.

If you have SSH access you can do this from one location.