NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page ping a url

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 09-17-2005, 12:05 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
edmarriner's Avatar
Join Date: Apr 2005
Location: England :D
Posts: 834
edmarriner is a jewel in the roughedmarriner is a jewel in the roughedmarriner is a jewel in the rough
 



ping a url


is there anyway or waebist to basicly ping the url say every 30 mins?

thanks

ed
__________________
Leeds united football club


edmarriner is offline  
Old 09-17-2005, 12:53 PM   #2 (permalink)
Senior Member
 
Shorty's Avatar
Join Date: Sep 2005
Location: England
Posts: 1,034
Shorty is just really niceShorty is just really niceShorty is just really niceShorty is just really nice
 



You mean non manually? No idea. You can just type ping http://www.sitename.com every 30 mins...
Shorty is offline  
Old 09-17-2005, 01:40 PM   #3 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
Join Date: Aug 2004
Posts: 3,809
stscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud of
 



Hey Ed,

Here's what we'll do. Assuming you have access to the ever ample PHP, crontabs and access to shell_exec(), we'll begin.

The following is a script that will run the ping, and return a result.
PHP Code:
<?php
/* 
Script written by Steve Castle (http://www.stscac.com)
Modified from http://shat.net/php/nqt/nqt.php.txt

For the purpose of this example, the filename of this file (PHP_SELF) will be named ping.php and located in server path erver/path/to/script/

The "$domain" variable is the domain name you are going to be checking.  Use  the domain name without the protocol.
(Good = namepros.com, Bad = http://www.namepros.com)
*/
$domain "namepros.com";
function 
message($msg){
echo 
"<font face=\"verdana,arial\" size=1>$msg</font>";
????: NamePros.com http://www.namepros.com/programming/124485-ping-a-url.html
flush();
}
function 
ping($domain){
message("<p><b>Ping Results:</b><blockquote>");
if (! 
$msg .= trim(nl2br(`ping -c5 '$domain'`))) #bugfix
  
$msg .= "Ping failed. Host may not be active.";
$msg .= "</blockquote></p>";
message($msg);
}
ping($domain);
?>
The following is the crontab that needs to be added to your server, so the PHP script above can be run every 1/2 hour.
Code:
30 * * * * server/path/to/script/ping.php
This only checks the results every 30 minutes. To report the results, you would have to email them or add them to a database.
????: NamePros.com http://www.namepros.com/showthread.php?t=124485

Hope this starts you off in the right direction.

Cheers !

-Steve
stscac is offline  
Old 09-17-2005, 01:43 PM   #4 (permalink)
Senior Member
 
dgaussin's Avatar
Join Date: May 2004
Location: France
Posts: 1,226
dgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to behold
 




You could try http://www.host-tracker.com
dgaussin is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Short URL Redirect Service!! iceman35 For Sale / Advertising Board 3 09-16-2005 07:41 AM
soooo many yahoo's redhippo Domain Name Discussion 5 07-13-2005 12:26 AM
masking download url -Ray- Programming 4 06-29-2005 07:17 AM
Free URL Redirection LeKiz Free Resources 0 03-30-2005 12:00 PM
Add your url to my site for free. gemsergio For Sale / Advertising Board 0 01-07-2004 10:23 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 07:08 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger