09.06.2010, 12:21
I got it working via ftp for any of those people who dont have access other than by ftp for their server.
Simply replace the server, user and user_pass fields with your ftp login information.
Then replace the bits in bold with the path to your scriptfiles.
Quote:
<?php global $config; $local_file = "dmap_feed.json"; $server_file = "chaosserver/0.3/scriptfiles/dmap_feed.json"; $ftp_server = "******"; // Address of FTP server. $ftp_user_name = "chaos"; // Username $ftp_user_pass = "*****"; // Password #$destination_file = "chaosserver/0.3/scriptfiles"; // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // try to download $server_file and save to $local_file if (ftp_get($conn_id, $local_file, $server_file, FTP_BINARY)) { "File Downloaded $local_file\n"; } else { "There was a problem\n"; } $config['api key']='---Removed---'; $config['default script'] = 'dmap_feed.json'; $config['allow external'] = true; ?> |
Then replace the bits in bold with the path to your scriptfiles.