Change the code on a large number of sites with one button?

Good evening, question
I have 40-50 sites, (conventional langosy) each site has a list with numbers of mobile phones
It happens that changing the phone number and should be on all sites to change it manually is a Chinese robot.
How can I automate? tell me what could be the solution)
Thank you!)
March 23rd 20 at 19:32
5 answers
March 23rd 20 at 19:34
Not can this info be stored, for example in a text file and display each of the sites one?

UPD: found this option

the <script>
$(document).ready(function(){
$('#txtfile').load('http://mysite/myfile.txt');
});
the <script>
<div id="txtfile"></div>
hi. where did you find it? - jeffrey_Yost55 commented on March 23rd 20 at 19:37
March 23rd 20 at 19:36
https://stackoverflow.com/a/1583282/1603055

find & sed

find /home/www \( -type d -name .git -prune \) -o -type f-print0 | xargs -0 sed -i 's/someOldText/someNewText/g'


Of course if they are on the same server are.
command i expects \ followed by text - something is missing and the command will fail. I want to change the contents inside the specific folder for a specific site, there to change the contacts, in fact the contents of the file. how to find and replace with sublime text but to on the remote host via ssh, for example from the command line. is there anyone knows how to do it I would be grateful for a hint - jeffrey_Yost55 commented on March 23rd 20 at 19:39
want to find and replace text

enter the Mac Mojave - find /home/www \( -type d -name .git -prune \) -o -type f-print0 | xargs -0 sed -i 's/someOldText/someNewText/g'

but it gives error command i expects \ followed by text - something is missing and the command will fail. I want to change the contents inside the specific folder for a specific site, there to change the contacts, in fact the contents of the file. how to find and replace with sublime text but to on the remote host via ssh, for example from the command line. is there anyone knows how to do it I would be grateful for a hint - jeffrey_Yost55 commented on March 23rd 20 at 19:42
March 23rd 20 at 19:38
Need a single source file with all phones (json, js, or even html) in the available server. On the sites themselves you can stick a script that will take the link this file to parse and stick the numbers in the right place.
About the base I'm not saying that the simple "conventional lindasy" hardly done on the hangar or PHP...
March 23rd 20 at 19:40
How can I automate? tell me what could be the solution)
Vskidku:
1. To use such data for General (one, unified) database. ACC. the phones output on the basis of data from this database
2. To phone from any text file, which for example, would be stored in the root servers at each site. For deployment use, like Git, or any continuous integration system or a self-made script which will use inotify (for Windows too, probably something like this is, if You have not Linux) and FTP or SSH or any other Protocol allowing a to send files to the server or any SCP or RSync.
3. The phone is stored in a text file on the same site (or on Yandex.Disk for example, or Liu, and the rest load this file (with some frequency, the data can be cached at the right time) from that website and to update it You will be resp. there
4. Wanted to write more option about search and replace text in the source code of all the sites, but noticed that previous speakers have voiced similar options...

You can also make a server API where the sites will receive the data and another dozen of other options...
March 23rd 20 at 19:42
Coding on the lend is made of a template type jekyll

Everyone has JSON settings
Sometimes common to all

Change there and rebuild everything

Or use sed

Find more questions by tags Web Development