note 71614 rejected from ref.ftp by nlopess

From: Date: Thu, 07 Dec 2006 19:57:31 +0000
Subject: note 71614 rejected from ref.ftp by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-120410@lists.php.net to get a copy of this message
Note Submitter: rodesignweb at gmail dot com ---- Hi there, I have PHP 5 installed on my server and I was trying this script: http://www.datafeed-scripts.com/ The main problem is this: when I call ftp.php file from feed folder, the scrips is copying blank zip files. It doesn`t copy the all zip folder (sorry for my english) <?php include ("../includes/db.conf.php"); include ("../includes/connect.inc.php"); $queryp=mysql_query("select * from departments where used='1' order by lasttime limit 0,1"); while ($rowp=mysql_fetch_array($queryp)) { $last= time(); $queryp2=mysql_query("update departments set lasttime=$last where csv='$rowp[csv]'"); $remote_file = $rowp['csv'].".zip"; $handle = fopen($remote_file, 'wb'); chmod($remote_file,777); $ftp_server = "ftp.overstock.com"; $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, "media", "m3d.14"); if (ftp_fget($conn_id, $handle, $remote_file, FTP_BINARY)) echo "successfully written to $remote_file\n"; else echo "There was a problem with $remote_file\n"; ftp_close($conn_id); fclose($handle); } ?> This is the ftp.php file. Can you give me a suggestion?

« previous php.notes (#120410) next »