I'm trying to put a little script together so a set of my websites can read a txt file from the 'main' website and then echo the HTML from that file. It would be straight forward, but some of the websites won't be on the same server, so i'm confused!? Anyone got some suggestions on how I can do this? Terry
Usually you would want a good reason to do this. If you must, you can use file handling functions, e.g. file_get_contents() to get data from a remotely hosted file as long as your host supports it (some don't for security reasons). Of course, there is a performance hit so I would suggest keeping a copy of this file on each server. If it is a regularly updated file that you don't want to update on each server manually, maybe setup a cron to update the version on the other servers when the one on the main server changes.
I'd personally do this by a scheduled cron job that will distribute the main file via mget calls -- this requires UNIX hosting. It's a bit convoluted to get into here ... PM me you want further help.