Код:
<html> <head> <style type="text/css"> body {background-color: darkgray} </style> </head> <center> <form action="check.php" method="post"><br> Host:<input type="text" name="host"><br> User:<input type="text" name="user"><br> Pass:<input type="text" name="pw"><br> <br><input type="submit" value="Check" /></table><br> </form> <center/>
check.php
Код:
<?php $host = $_POST["host"]; $user = $_POST["user"]; $pass = $_POST["pw"]; $con = ftp_connect($host) or die("cant connect"); if (@ftp_login($id, $user, $pass)) { echo "<font color=blue>Working!</font>"; } else { echo "<font color=red>Not working</font>"; } ftp_close($con); ?>