note 71614 added to ref.ftp

From: Date: Thu, 07 Dec 2006 19:23:35 +0000
Subject: note 71614 added to ref.ftp
Groups: php.notes 
Request: Send a blank email to php-notes+get-120409@lists.php.net to get a copy of this message
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? ---- Server IP: 66.163.161.117 Probable Submitter: 84.247.97.28 (proxied: 10.10.12.91) ---- Manual Page -- http://www.php.net/manual/en/ref.ftp.php Edit -- https://master.php.net/note/edit/71614 Del: integrated -- https://master.php.net/note/delete/71614/integrated Del: useless -- https://master.php.net/note/delete/71614/useless Del: bad code -- https://master.php.net/note/delete/71614/bad+code Del: spam -- https://master.php.net/note/delete/71614/spam Del: non-english -- https://master.php.net/note/delete/71614/non-english Del: in docs -- https://master.php.net/note/delete/71614/in+docs Del: other reasons-- https://master.php.net/note/delete/71614 Reject -- https://master.php.net/note/reject/71614 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120409) next »