Hi Folks, Basically we have 10 websites. One particular page on all these website have same data. Its really painful when I have to update all the websites separately with same content. Can we have a separate webpage/source which could be edited and all the websites are automatically updated? probably like Stock prices are synched across all platforms.. not sure I am not very good at programming however I have good knowledge base of Wordpress (if that helps). if anyone can put me in right direction so I can accomplish that task. I have Lynda subscription (in case they have relevant tutorials) Thanks in advance, Sab
Depending on how these pages are made, you could pull information from one file on one of the domains to the other domains, and parse it. Again, depends on the content how you would want to do that - if it's complex, maybe just make a HTML-file with the content, which you then can update, and include it via PHP on all the pages. Will require that the domain with the content-file is always available.
I agree, using xml or json or just plain html that you fetch from a main server this could be done, but then you'll need to have some scripting (programming) experience...
HI Eric, Thanks for your reply. Could you please redirect me to any relevant tutorial? or give some step by step instructions on that.
Thanks for your reply. How would I "pull" content from other website. what the process called? Could you please redirect me to any relevant tutorial? or give some step by step instructions on that.
I recommend to avoid duplicate content altogether. It will have a negative impact on Google ranking for both of your sites.
http://stackoverflow.com/questions/15617512/get-json-object-from-url http://stackoverflow.com/questions/12542469/how-to-read-xml-file-from-url-using-php GL
You can use one DB and make connection from all websites to this DB or you can just paste links from all websites to your main website were this page is...? Plus it is not a good practice to have the same page on different sites.
The OP has TEN sites, NOT TWO sites, so if it has a negative impact on TWO of his sites, WHY won't it have a negative impact on the OTHER EIGHT of his sites????
NOTE: Please replace <http> with http:// in all the code and notes provided. As dp was not allowing example URLs, I had to put some pace holder. Problem: Sync the contents of multiple websites based on certain URL Assumptions: a) <http>ABC.com is your main website you want to update html content in the <body> tag and you want: b) <http>XYZ.com and <http>123.com to pull content of <body> tag from <http>ABC.com on certain page. c) Assuming <http>ABC.com, <http>XYZ.com and <http>123.com have one similar page that needs to be synced. d) <http>XYZ.com and <http>123.com will load the index.html body content that was updated on <http>ABC.com. Solution: a) create new file called sync.php and put following content: <?php if (isset($_GET['page'])) { header('Content-Type: text/html'); $html = file_get_contents(@$_GET['page']); //or use curl if this doesn't read if (!preg_match("/<body>(.*)<\/body>/Usi", $html, $matches)) die('Body content not found at - '.$_GET['page']); die($matches[1]); } print 'Invalid request'; Code (markup): b) upload file to root of sites need to synchronize , so the urls are <http>XYZ.com/sync.php and <http>123.com/sync.php c) test by opening url in browser <http>XYZ.com/sync.php?page=<http>ABC.com/index.html if it returns the same data as in the <body> tag of ABC.com index page, good, go ahead. d) At this point you need to modify you index.html file on each website that needs to keep same html as in ABC.com, that would be index.html in this case. Edit your XYZ.com/index.html and 123.com/index.html , remove all body tag content and put following code between their <body> and </body> tag. NOTE: Make sure to backup first : ) <html> ........ whatever already here ........ keep it same <body> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <script> jQuery(function(){ jQuery.get('./sync.php?page=<http>ABC.com/index.html', function(body_html) { jQuery('body').html(body_html); }); }); //not using $ for jQuery intentionally </script> </body> </html> Code (markup): Hope it helps (I did no test though). If there's any problem let me know. NOTE: this is one of many proposed solutions. Stay well..