CMellor Posted December 23, 2006 Share Posted December 23, 2006 Hey, I was hoping you could help me; I am on the search for a bit of code that can tell me if another website on the internet is up and active, or non existent. I know it exists, as I've seen it before, but I can't find anything and I can't find the right keywords to use when searching for it.If anybody knows of such a code, could you direct it to me please?Thanks so much,Chris. Quote Link to comment Share on other sites More sharing options...
Eugene Posted December 23, 2006 Share Posted December 23, 2006 [code=php:0]<?PHPif(@fsockopen("somewebsite.com", 80, $erno, $erstr, 30)) { //website exists echo "it exists!!!";} else { echo "{$erno} - {$erstr}";}?>[/code] Quote Link to comment Share on other sites More sharing options...
CMellor Posted December 23, 2006 Author Share Posted December 23, 2006 Awesome, thanks for the quick response.I knew it was a simple code. Shame I can't see to make it work, but that's because I'm testing on my Localhost, so when I try it, it just comes up with "Page cannot be displayed" Ah well, I guess I'll have to wait until I have my web host set up.Thanks again. Quote Link to comment Share on other sites More sharing options...
trq Posted December 23, 2006 Share Posted December 23, 2006 If you have an internet connection it should work. Have you a testing server setup? 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.