Re: image uploading into many ftp(dynamically) site in php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi Kalaiselvi Ranganathan

 To atchieve this logic with php you can use ftp_connect function i 
think this function is available in php5 or php4 even 3 i think.

sample source code 

$host = 'host';
$user = 'username';
$pass = 'password';

$local_file = 'path of file/file.txt';
$remote_file = 'path of file/file.txt';

$conn = ftp_connect($host) or die ("Cannot initiate connection to 
host");

                  if (!$conn)
                  {
                  echo ' FTP cannot connect';
                  }else{
                  $login = ftp_login($conn, $user, $pass) or die
("Cannot login");
                  echo ' FTP connected';
                  }

                  if (!$login)
                  {

                  }
                  else
                  {
                  ftp_put($conn, $remote_file, $local_file, 
FTP_ASCII);
                  } 


--- In php-objects@xxxxxxxxxxxxxxx, kalai selvi <kalaikalki6484@...> 
wrote:
>
> 
> --- kalai selvi <kalaikalki6484@...> wrote:
> 
> > 
> > hi all,
> > 
> > 
> > any one help,i need to upload an image to two
> > different  ftp site (ftp path),using php script,so 
> > any one help for me,how to proceed for this logic in
> > php.waiting for reply,thanks in advance,
> > 
> > Reagrds,
> > 
> > 
> > Kalaiselvi Ranganathan
> > 
> > 
> >  
> >
> 
______________________________________________________________________
______________
> > Do you Yahoo!?
> > Everyone is raving about the all-new Yahoo! Mail
> > beta.
> > http://new.mail.yahoo.com
> > 
> 
> 
> Reagrds,
> 
> 
> Kalaiselvi Ranganathan
> 
> 
>  
> 
______________________________________________________________________
______________
> 8:00? 8:25? 8:40? Find a flick in no time 
> with the Yahoo! Search movie showtime shortcut.
> http://tools.search.yahoo.com/shortcuts/#news
>



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux