Created
March 22, 2025 07:13
-
-
Save mehrshaddarzi/83b3bff1bde0ac2287006394c76101a7 to your computer and use it in GitHub Desktop.
Test PHP FTP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// connect to FTP server | |
$ftp_server = "80....."; | |
$ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server"); | |
// login | |
if (@ftp_login($ftp_conn, "user", "pass")) | |
{ | |
echo "Connection established."; | |
} | |
else | |
{ | |
echo "Couldn't establish a connection."; | |
} | |
// close connection | |
ftp_close($ftp_conn); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment