application track record: As being a webmaster, so as to handle the site, and to please the search engines every single day at several times must update the site's content, some proprietors need to maintain numerous Web websites,
Microsoft Office 2010 Professional Plus, the every day workload One can imagine that in the event the holidays, the owners do not or cannot accessibility the laptop or computer side, the maintenance work won't move forward.
use principle: This paper describes a technique to automatically update the web-site content material, utilizing a Windows method company, set its URL to access the address, inside a distinct time each and every day to update the contents of the Web internet site to entry the special pages (assuming that web page is often a); on the web site aspect, set up a screening mechanism, and only accepted content to become shown to the web page front end, the new Canadian data is not audited by default,
Microsoft Office 2010 Professional, page A's function is never singled out some evaluation audit info , to ensure that updated content material, the static household page, the page can also create the following web page A static web page. A page certainly, can do a lot more makes use of, for example backup database, change the user status expires, delete unused short-term files.
comprehensive ideas:
one) Windows server:
Windows Services making use of. Web Framework2.0 framework, it must be put in employing the good. Web Framework2.0, Obtain:
xml file utilizing a saved configuration information and facts, which need to access the internet internet site storage, the sample framework is as follows:
an item on behalf of a pay a visit to,
Microsoft Office Professional Plus 2010, url can be a particular internet site, set to instantly update the url web-site deal with, you possibly can update with a query string to set the amount, time access time that day, time can only be accurate to 1 minute and should ensure that every single merchandise within the same moment, only a url tasks.
plan utilizes a timer, each and every twenty seconds to scan the configuration merchandise in the should accessibility the web site, if there is certainly 1 visit the web page. Appropriate code is as follows:
public Position ()
System.Timers.Timer myTimer = new System.Timers.Timer (20000);
myTimer.Elapsed + = new ElapsedEventHandler (myTimer_Elapsed);
myTimer.Enabled = true;
myTimer.AutoReset = true;
XmlDocument xml = new XmlDocument ();
xml.Load (AppDomain.CurrentDomain.BaseDirectory + ConfigurationManager.AppSettings [xmlfile ]);
xmllist = xml.SelectNodes (/ / root / Urls / item);
void myTimer_Elapsed (object source, ElapsedEventArgs e)
{
try
Log.SaveNote (DateTime.Now.ToString (yyyy-MM-dd HH: mm: ss) + Heart Work! (heartbeat detection ));
YourTask ();
catch (Exception ee)
Log.SaveException (ee);
}
void YourTask ()
{
count ++;
if (count> 10000)
count = 0;
for (int i = 0; i <xmllist.Count; i ++)
{
string url = xmllist [i]. Attributes [url]. Value;
string time = xmllist [i]. Attributes [time]. Value;
/ / Log.SaveNote (url + - + time);
DateTime workTime = DateTime.Parse (DateTime.Now.ToShortDateString () + + time);
/ / lastwork
if (DateUtil.DateDiff (DateUtil.DateInterval.Minute, workTime, DateTime.Now) == 0)
{
/ / to the execution time
if (DateUtil.DateDiff (DateUtil.DateInterval.Minute, workTime,
Microsoft Office 2010 Professional Plus, lastworktime)! = 0)
/ / access the web site, such as mobile themes
visit (url);
lastworktime = DateTime.Now;
}
}
}
void visit (string url)
{
HttpWebRequest myHttpWebRequest = null;
HttpWebResponse myHttpWebResponse = null;
Stream receiveStream = null;
try
myHttpWebRequest = (HttpWebRequest) WebRequest.Create (url);
myHttpWebResponse = (HttpWebResponse) myHttpWebRequest.GetResponse ();
receiveStream = myHttpWebResponse.GetResponseStream ();// get back to writing the byte stream
Log.SaveNote (visit: + url);
catch (Exception ex)
Log.SaveNote (access failed: + url);
Log.SaveException (ex);
finally
if (receiveStream! = null)
receiveStream.Close ();
if (myHttpWebResponse! = null)
myHttpWebResponse.Close ();
}
2) Web-side:
web site audit consumer should really use mechanisms, for instance a table News tables, set area isaccept to assessment the field, one which has been audited,
Microsoft Office Enterprise 2007, unaudited 0, add the contents of the default just isn't reviewed 0. Even more than in peacetime, when we add some content material towards the library isn't reviewed, after which towards the system to automatically update. Update to use any dynamic internet page technologies, asp, php, jsp could be, the role with the system would be to alter not reviewed the contents with the audit status, for that sake of flexibility, it is easy to set a question string that update the number of variables for the system, If num, the web-site is up-to-date 3 becomes