When any notice or advertisement is required by law or order of court to be published in any newspaper, the certificate of the printer or publisher with a printed copy of such notice or advertisement annexed, stating the number of times which the same has been published and the dates of the first and last paper containing the same, shall be sufficient evidence of the publication therein set forth. Such notices and certificates of the publication thereof, when so certified, shall be a part of the records of the court.