| We've arrived, and to prove it we're here |
| « VBScript to copy/backup files... | Free J&C phpGallery » |
This little PHP snippet will allow you to check if a remote web server is online and include a file from the remote server. Because PHP's include command does not seem to work with remote servers we have used the readfile command to replace it.
<?php
if(fsockopen("remoteserver.com", 80, $errno, $errstr, 2)){
@readfile("http://remoteserver.com/path/filename.ext");
} else {
// do something else if server is not available...
}
?>