Not sure on the 404 part, you might look at CURL.
For the DNS part you could do
if (!gethostbyname(server1.dydns.org)) {
header ("Location server2.dycns.org");
}
This function is in the PHP manual.
Jason
-----Original Message-----
From: Philip J. Newman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 2:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP] [Newman] Help Needed with a redir script.
I have a list of links!
$linkone="http://server1.dyndns.org/";
$linktwo="http://server2.dyndns.org/";
I would like to make a script that looks for http://server1.dyndns.org/, if
it returns a 404, or DNS error then it redirects to
http://server2.dyndns.org/ this server.
Any suggestions.
Philip J. Newman
PhilipNZ :: Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]
ICQ# 20482482
+64 25 6144012
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php