just need simple script to check domains if they're working... like adding let's say 50 domains and when I execute php file it will check if they're loading or dead... thanks
php script...
Collapse
X
-
If you are looking to invest a few bucks for this technology, hit me up, icq: 33375924Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager -
This is a quick crude method but it should do it, let me know if it works (don't pay someone for <10 lines of code) ;)
Just set the list of URLS in the urls variable.
Code:<?php $urls = array('http://google.com','http://yahoo.com'); foreach ($urls as $value) { $siteCheck = get_headers($value); $statusCode = substr($siteCheck[0] , 9, 3); if ($statusCode >= 400) { print $value . ': Down<br />'; } else { print $value . ': Up<br />'; } } ?>Last edited by potter; 07-09-2011, 02:12 PM.
Comment
-
/edit. you only wanted to test sites not server, this script tests the server probly not what you wanted.
Freeware SERVER_ONLINE_TEST PHP script - Check status (online/offline) of the chosen web server(s).
http://www.adamek.biz/server_online_test/
.Last edited by Aka_Bluey; 07-09-2011, 02:52 PM.Things that make ya go hmmmm....Comment
-
-
xMarkPro will do that. Bit more than $5 though. Also allows you to specify a small phase for each domain, and it ensures that phrase shows up on the home page. Helps prevent against server errors, hosting account suspensions, etc.xMarkPro -- Ultimate Blog Network Management
Streamline your marketing operations. Centralize management of domains, pages, Wordpress blogs, sponsors, link codes, media items, sales and traffic statistics, plus more!Comment
-
gives me Fatal error: Call to undefined function: get_headers() in /www/users/check.php on line 4This is a quick crude method but it should do it, let me know if it works (don't pay someone for <10 lines of code) ;)
Just set the list of URLS in the urls variable.
Code:<?php $urls = array('http://google.com','http://yahoo.com'); foreach ($urls as $value) { $siteCheck = get_headers($value); $statusCode = substr($siteCheck[0] , 9, 3); if ($statusCode >= 400) { print $value . ': Down<br />'; } else { print $value . ': Up<br />'; } } ?>Comment
-
Comment
-
Here is a simple Perl script tutorial: http://perl.about.com/od/appliedprog...icemonitor.htm
Maybe, that would work better in your situation ...
To get your server's PHP version;
in SSH or terminal:
or in a file$ php -v
PHP Code:<?php phpinfo(); ?>Comment
-
For a more solid version, you might like our clonebox monitoring system. The simple code posted generally won't alert you to a completely broken page with an error message, for example, or a hacked page.
The sort simple page will also sometimes say that a sure is down when actually everything is ok.
Clonebox checks every few minutes and emails you or sends you an SMS if it's down for more than five minutes. Clonebox can even automatically switch to a backup server when the site goes down.For historical display only. This information is not current:
support@bettercgi.com ICQ 7208627
Strongbox - The next generation in site security
Throttlebox - The next generation in bandwidth control
Clonebox - Backup and disaster recovery on steroidsComment
-
Fris is right, you definitely shouldn't be using php4 any more. I'm sure your host allows you to switch your account to php5. You can email them and ask or simply google "myhostcompanyname switch to php5".
Usually if you're on a shared host and they have you default to php4, you can easily switch to php5 by adding "AddHandler application/x-httpd-php5 .php" to your htaccess file.
Comment
-
anyway to do it in php 4 ?Fris is right, you definitely shouldn't be using php4 any more. I'm sure your host allows you to switch your account to php5. You can email them and ask or simply google "myhostcompanyname switch to php5".
Usually if you're on a shared host and they have you default to php4, you can easily switch to php5 by adding "AddHandler application/x-httpd-php5 .php" to your htaccess file.Comment
-
Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more!
AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons
Comment
-
coders lol
be our partner - join nichepartners today
will.assum.producer @ AmateurCanada.com / icq: 30146166 / facebook.com/will.assum / #amateurcanadaComment




Comment