Hello,

you posted this message to the wrong list, you need the 
[EMAIL PROTECTED] for support questions. (This is list is for 
discussing PHP Internals).

Derick

On Wed, 6 Mar 2002, Vishak Tomy wrote:

> Hello,
> 
> i tried to download 32000 images from another to my server, through the
> code,
> 
> 
> $conn_id = ftp_connect("$ftp_server");
> 
> $login_result = ftp_login($conn_id, "$ftp_user_name", "$ftp_user_pass");
> 
> if ((!$conn_id) || (!$login_result)) {
>         echo "Ftp connection has failed!";
>         echo "Attempted to connect to $ftp_server for user $user";
>         die;
>     } else {
>         echo "Connected to $ftp_server, for user $user";
>     }
> $arr = ftp_nlist ($conn_id, ".");
> 
> for($i=0;$i<=sizeof($arr); ++$i) {
>         $dir_first = substr($arr[$i],0,1);
>         $dir_second = substr($arr[$i],0,2);
>         $target_name = strtolower($arr[$i]);
>        $upload = ftp_get($conn_id,
> "../images/photos/$dir_first/$dir_second/$target_name", "$arr[$i]",
> FTP_BINARY);
>      }
>     }
>   }
> 
> if (!$upload) {
>         echo "Ftp upload has failed!";
>     } else {
>         echo "Uploaded source_file to $ftp_server as destination_file";
>     }
> 
> ftp_quit($conn_id);
> 
> the file names are from
> 40000_0.jpg,40000_1.jpg,41000_0.jpg...49000_0.jpg etc
> 50000_0.jpg,50000_1.jpg,51000_0.jpg...59000_0.jpg
> all files starting 40000_0.jpg will download to
> ../images/photos/4/40/40000_0.jpg
> all files starting 41000_0.jpg will download to
> ../images/photos/4/41/40000_0.jpg
> ......................
> all files starting 50000_0.jpg will download to
> ../images/photos/5/50/40000_0.jpg
> all files starting 51000_0.jpg will download to
> ../images/photos/5/51/40000_0.jpg
> 
> is any easy method than above one pls inform.
> the problem is that all afiles aare not downloading, then showing the
> message
> cannot find server in IE. around 10000 files downloaded.
> any body please solve this
> 
> 
> 
> 
> 
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
> 
> 
> -- 
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

----------------------------------------------------------------------
              PHP: Scripting the Web - [EMAIL PROTECTED]
                All your branches are belong to me!
            SRM: Site Resource Manager - www.vl-srm.net
-----------------------------------------------------------------------


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to