
Solid, safe website tools.
Whatever your need, Will Bontrager builds powerful software solutions.
|
(Get Attention Ticker for your web site)
Automating DNS Change Propagation CheckBy Will Bontrager Today, I changed the DNS settings for a client's web site. I wanted to do a thorough check of the site's blog, scripts, and links as soon as I could after the change. But I did not want to sit around waiting for the DNS to propaget to our ISP. And I did not want to intermittently interrupt a different project I would be doing in the meantime to do a manual check. So, I automated it. How to Automatically Check DNS Change PropagationYou'll need a server on your desktop computer to use this. Mac OSX comes with one. PC users can find the free Apache server here. Edit this PHP and then upload put it in a public directory of your desktop server. (Edits noted below.) The web page on the new server needs to have a unique string of characters in it not present in the page located at the old server. Replace the value of $STRING between the quotation marks with the unique characters. Now, scroll down the PHP page to just below the PHP code, where the HTML code starts. You'll see a meta tag. The number 30 in that meta tag will tell the browser to try that page again in 30 seconds. You can change that number. In the body area of the web page, you'll see a section where the word YES is printed in big type if the DNS has changed and the unique string of characters were found on the web page at the new server. Otherwise, "not yet" is printed. What is printed may be changed to whatever you wish it to be. A person could even put self-starting music into the section with the YES, to act as an alarm clock of sorts. Put the page in the document area of the server on your desktop computer. Load it into your browser with the URL of your server (probably http://127.0.0.1/..., although it could be different). Now, your browser will try the web page every 30 seconds, or other frequency if you changed that number in the meta tag. When it finds the unique string of characters, it will display the YES part of the web page. Otherwise, it will display the "not yet" part. March 8, 2008 Please note: Articles on this website are presented "as is". However - If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Rate this blog post.
No page reload! |
|
|
© 1998-2001 William and Mari Bontrager |
|