balebond Posted May 12, 2008 Share Posted May 12, 2008 Is there any way to know that a domain has propagated using PHP? Maybe like pinging a url in code? Or perhaps there is a better way to do what I need. Basically I use Parallels Sitebuilder and its API to auto create an account and prepare the site for publishing upon checkout (yay action hooks ) In order for users to publish right away (some instant gratification) I pass in the temporary url... otherwise if they try to publish before propagation they get an ugly error. I'd like to automatically reconfigure the site publishing settings via a nightly cron job to point to the domain once it's propagated. I've tried to use Net_Ping but it only ever returns 'unknown host' no matter what I pass it. Not sure why. In any event, if anyone has an idea how to accomplish this via another method or how to get Net_Ping to work it would be greatly appreciated. 0 Quote Link to comment Share on other sites More sharing options...
ckh Posted May 13, 2008 Share Posted May 13, 2008 Propagation depends on a number of things, including where you are trying to access it from. There's not one sure way to know if it's propagated for everyone. Your computer caches dns, your ISP also caches the dns. How often the caches are updated depends on your computer settings, ISP settings, etc. Propagation can occur for one person but not another. There are some things you can do, flush your computer dns cache, flush your browser cache but I've found this doesn't always help. I've had times where I'd have propagation on one computer but not another one on the same lan. What I usually do is use one of those proxy servers on the web where it's highly unlikely that the dns is cached for your site. You can also make a minor modification to one of the pages or even add a quick page to the new site so when it becomes accessible, you'll be able to see the slight change or the new page comes up. Normally it will come up pretty quick when you access the site from a computer that hasn't visited the site before. But, there's no good easy way to tell for sure, it's normally just a waiting game and should occur within 24 hours, normally within a few minutes nowadays... 0 Quote Link to comment Share on other sites More sharing options...
balebond Posted May 13, 2008 Author Share Posted May 13, 2008 All valid points. I've decided to just have my cron job update all sitebuilder accounts older than 24 hours and our KB and welcome email will explain how to do it manually if they see their domain propagate before that. Thanks for the response. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.