RE: [PHP] [Newman] Help Needed with a redir script.
| From: | Non-HP-Boise,ex1) | Date: | Tue, 26 Mar 2002 23:06:41 +0000 |
| Subject: | RE: [PHP] [Newman] Help Needed with a redir script. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-90284@lists.php.net to get a copy of this message | ||
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:newmanpj@philipsdomain.com]
Sent: Tuesday, March 26, 2002 2:42 PM
To: php-general@lists.php.net
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/
info@philipnz.com
ICQ# 20482482
+64 25 6144012
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php