<?php global $config; $local_file = "dmap_feed.json"; $server_file = "/home/samp03/scriptfiles/dmap_feed.json"; $ftp_server = "REMOVED"; // Address of FTP server. $ftp_user_name = "root"; // Username $ftp_user_pass = "REMOVED"; // Password #$destination_file = "C:\Documents and Settings\DraKoNSAMP\Desktop\Clan [mGo]\GAMEMODE SAMP\GM\Sourcer\scriptfiles"; $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); if (ftp_get($conn_id, $local_file, $server_file, FTP_BINARY)) { "File Downloaded $local_file\n"; } else { "Desculpe.Servidor Esta Desligado\n"; } $config['api key']='ABQIAAAAs4hWYZkFgUCmji8OXGEWhRSksbxBFPegAttWA_e4E3REnVZ2ahTH-L1GBwSzV3-OuBv0_8-shNpqtQ'; $config['default script'] = 'dmap_feed.json'; $config['allow external'] = true; ?>
<?php global $config; $local_file = "dmap_feed.json"; $connection = ssh2_connect('removed', 22); ssh2_auth_password($connection, 'username', 'password'); ssh2_scp_recv($connection, '/remotefile', '/local/file'); $config['api key']='ABQIAAAAs4hWYZkFgUCmji8OXGEWhRSksbxBFPegAttWA_e4E3REnVZ2ahTH-L1GBwSzV3-OuBv0_8-shNpqtQ'; $config['default script'] = 'dmap_feed.json'; $config['allow external'] = true; ?>
figured it out what i did is as follows.
Код:
<?php global $config; $local_file = "dmap_feed.json"; $connection = ssh2_connect('removed', 22); ssh2_auth_password($connection, 'username', 'password'); ssh2_scp_recv($connection, '/remotefile', '/local/file'); $config['api key']='ABQIAAAAs4hWYZkFgUCmji8OXGEWhRSksbxBFPegAttWA_e4E3REnVZ2ahTH-L1GBwSzV3-OuBv0_8-shNpqtQ'; $config['default script'] = 'dmap_feed.json'; $config['allow external'] = true; ?> |