Chicano
02-14-2003, 02:59 AM
Hi, I posted this in the PHP forum athttp://www.codingforums.com/showthread.php?s=&postid=72093
but, since I have not got another response, I decided to see if it could be done in ASP ... (Note, i know nothing of ASP ... does it need to be installed on a system? Or does it normally come with most servers... like Apache on Unix...)
If anyone could give me a little help, I would greatly appreciate it ...
The script I want to emulate from PHP is this:
<?php
$file = @fopen("ftp://testserver:servertest@myserver.address.org/test.html", "r");
if (!$file) {
echo '<b id=Off> Offline</b>';
exit;
}else{
echo '<b id=On> Online</b>';
}
?>
or, as I have been told is an easier way (even tho I havent been able to make it work) this:
if(file_exists("ftp://username:password@yoursite.com/file.txt")){
echo 'Server online';
}else{
echo 'Server offline';
}
Thank you very much!
but, since I have not got another response, I decided to see if it could be done in ASP ... (Note, i know nothing of ASP ... does it need to be installed on a system? Or does it normally come with most servers... like Apache on Unix...)
If anyone could give me a little help, I would greatly appreciate it ...
The script I want to emulate from PHP is this:
<?php
$file = @fopen("ftp://testserver:servertest@myserver.address.org/test.html", "r");
if (!$file) {
echo '<b id=Off> Offline</b>';
exit;
}else{
echo '<b id=On> Online</b>';
}
?>
or, as I have been told is an easier way (even tho I havent been able to make it work) this:
if(file_exists("ftp://username:password@yoursite.com/file.txt")){
echo 'Server online';
}else{
echo 'Server offline';
}
Thank you very much!