You simply use http as your protocol instead of ftp.
That assumes that the files moved via FTP are available to be served from a published directory such as public_html. If they are above the public_html or www or whatever published directory, you cannot use http to access them.
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php