Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function update_news_posted(){
- set_time_limit(3600);
- $plugin_path=plugins_url()."/".basename(dirname(__FILE__));
- $dir=dirname(__FILE__);
- $local_file=fopen($dir."/news.xml","w");
- $server_file="/demo/CFB_STORY$20111106142743765857508.XML";
- $ftp_user="general";
- $ftp_pass="g3n3ral";
- $ftp_server="ftp.stats.com";
- $conn_id=ftp_connect($ftp_server) or die("Could not connect");
- $login_result=ftp_login($conn_id,$ftp_user,$ftp_pass) or die("Could not login");
- if(ftp_fget($conn_id,$local_file,$server_file,FTP_BINARY)){
- }
- else
- die("Problem with downloading the file.");
- fclose($local_file);
- ftp_close($conn_id);
- }
Add Comment
Please, Sign In to add comment