I am using PHP , I want to connect to remote server in SFTP, but the website said: Fatal error: Call to undefined function ssh2_connect() in D:\xampp\htdocs\dive\database.php on line 9
Can you tell me in detail how to do this? I tired
<?php
$connection = ssh2_connect('ftp.server.com', 22);
if (ssh2_auth_password($connection, 'username', 'password'))
echo "Authentication success";
else
echo "Authentication failure";
?>
But it doesn't work.
After I connect to the server, is there a difference if I want to insert some data to the table in it? Which function should I use?