Discussions















                                          
User   Password   remember     (register)  ?

PHP : Send a file with FTP


Back to programming.


guest-php_ftp    (2009-04-17)
 
PHP : Send a file with FTP

This small PHP script will allow you to send a file through FTP, you just have to know the address, login & password of the server you want to put the file on :


$ftp_server = '213.186.xx.xx';

$ftp_user_name = 'ns30xxx.ovh.net';
$ftp_user_pass = 'xxxxxxxx';

$message = '';


if (file_exists($source_file))
{
  $conn_id = ftp_connect($ftp_server);
 
  $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);

  if ((!$conn_id) || (!$login_result))
  {
    $message .= 'FTP connection failed. <br><br>';
  }
  else
  {
    $message .= 'FTP connection succeeded. <br><br>';
  }
 
  $upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
 
  if (!upload)  $message = 'FTP upload failed. <br><br>';
  else  $message = 'FTP upload succeeded. <br><br>';
 
  ftp_close($conn_id);

  print $message;



ficgs
Suggestions

  PHP send file directly to FTP - Programming
forums.whirlpool.net.au/forum-replies-archive.cfm/1054739.html

 Send Files via FTP Using PHP
davidwalsh.name/send-files-ftp-php

 FileZilla - Client Download
filezilla-project.org/download.php

 PHP FTP file upload example
www.jonasjohn.de/snippets/php/ftp-example.htm

 FTP Class (ftp, ftp class) - PHP Classes
www.phpclasses.org/browse/package/1772.html

 SourceForge.net: FileZilla: Files
sourceforge.net/project/showfiles.php?group_id=21558

 PHP FTP vs. File Upload - Codewalkers
forums.codewalkers.com/php-coding-7/php-ftp-vs-file-upload-756.html

 Keep your options open with FTP file uploads using PHP
articles.techrepublic.com.com/5100-10878_11-6069684.html



ficgs
More suggestions

This is a collaborative page, you may change the order of these suggestions by registering, then clicking the icons before the titles.


  PHP Script to FTP file to another website - bluehostforum.com
www.bluehostforum.com/showthread.php?p=68538

 curl FTP file Upload | PHP Script Forums
www.finalwebsites.com/forums/topic/curl-ftp-file-upload

 Tutorial: FTP Upload via cURL | Web Development Blog
www.web-development-blog.com/archives/tutorial-ftp-upload-via-curl/

 Uploading of files - The solution
en.kioskea.net/faq/sujet-1003-uploading-of-files

 Php Ftp Upload Form
www.trap17.com/index.php/php-ftp-upload-form_t55649.html

  Uploading a file using Ajax and PHP's FTP? [Archive] - CodeGuru Forums
www.codeguru.com/forum/archive/index.php/t-379414.html

 Error in uploading file via ftp server - PHP
www.daniweb.com/forums/thread147064.html

 Uploading Image File Through JSP Code To Server
www.astahost.com/info.php/uploading-image-file-through-jsp-code-server_t988

 upload file to ftp with html-form and php ? - Dev Shed
forums.devshed.com/ftp-help-113/upload-file-to-ftp-with-html-form-and-php-1

 PHP's FTP functions tutorial
phpsense.com/php/php-ftp-functions.html

  Overwriting a txt file using php and ftp. - Dynamic Drive Forums
www.dynamicdrive.com/forums/showthread.php?t=43661

 WinSCP :: Download
winscp.net/eng/download.php

 Download PHP & FTP File Manager - PHP & FTP File Manager is a visual file manager developed in PHP, JAVASCRIPT and AJAX. - Softpedia
webscripts.softpedia.com/script/File-Management-Perl/PHP-FTP-File-Manager--

  PHP-General - How to send text data via ftp [Archive] - CodingForums.com
www.codingforums.com/archive/index.php/t-138812.html

  GetAFreelancer.com - App to send image files to multiple FTP addresses automatically from folder.
www.getafreelancer.com/projects/Perl-CGI-Java/App-send-image-files-multiple

 PHP IDE :: NuSphere Forums :: View topic - FTP client send MFMT?
forum.nusphere.com/viewtopic.php?t=5737

 PHP Edit FTP File at Script Software Informer
script.software.informer.com/download-script-php-edit-ftp-file/

 How To Upload File Via FTP Using PHP Code?, discussion in PHP Scripts Section
discussion.accuwebhosting.com/php-scripts/708-how-upload-file-via-ftp-using

 Chmod - FTP File Permissions - STADTAUS.com
www.stadtaus.com/en/tutorials/chmod-ftp-file-permissions.php

 Code Examples -> very simple ftp class
www.weberdev.com/get_example-4475.html

 PHP form to upload via FTP
www.phpfreaks.com/forums/index.php?topic=219661.0

 FTP Administration with full logging via PHP | Tudor-Alexandru Dobrila
blog.dta.ro/2007/09/26/ftp-admin-with-log-via-php/

  HOWTO Ridiculously easy home file sharing with FTP and Zeroconf - Ubuntu Forums
ubuntuforums.org/showthread.php?t=218630

  PHP Script to FTP file to another website - bluehostforum.com
www.bluehostforums.com/showthread.php?p=68538

 How do I use HomeBase to send a file via FTP? - Biblio.com
www.biblio.com/faq_detail.php?faqid=31

 send log file via ftp (file already in use) - Developer Discussion Boards
discussion.forum.nokia.com/forum/showthread.php?t=107795

 File permissions, created by PHP script - unable to delete through FTP!!!
forums.digitalpoint.com/showthread.php?t=112238

 ftp code
snippets.dzone.com/tag/ftp

  [dev] [cvs] commit: framework/VFS/VFS file.php ftp.php smb.php sql.php sql_file.php ssh2.php
lists.horde.org/archives/dev/Week-of-Mon-20060417/019636.html

  FastCGI error when upload a PHP file by FTP : The Official Microsoft IIS Site
forums.iis.net/t/1153815.aspx

 Download File Upload Download Using Ftp In Php Source Codes, File Upload Download Using Ftp In Php Scripts - X360 Ftp ActiveX OCX by X360 X360, Chili ...
www.sourcecodeonline.com/list?q=file_upload_download_using_ftp_in_php

 Keep your options open with FTP file uploads using PHP protocols - Program - Web Technologies - Builder AU
www.builderau.com.au/program/web/soa/Keep-your-options-open-with-FTP-file-u



Response  
  Smilies

Guest name   (optional)       Register for more options.



Trackbacks : If you talked about this article in your blog or website, you may instantly get a backlink 
  There's no trackback at the moment.









 

FICGS message




Discussions



 

March 20, 2010

 

Buttons: Facebook, Twitter, MySpace, Google, Technorati, Yahoo buzz... Ficgs Facebook Myspace Twitter Google Technorati Stumble upon Delicious Digg Yahoo buzz Wikio Furl Reddit Linkedin Squidoo Newsvine Yahoo My Web Blogmarks Comments Blinklist Email

You comment I follow : Links included in comments will be "dofollow" if your post is not an obvious spam, comments are published instantly.


Write upside down to your friends !
(works with MySpace, Twitter, Facebook, Youtube, MSN, Hi5, Bebo, Yahoo...)






Tip of the day :

You don't know how to find a file to download on Rapidshare or Megaupload ?

You should try this command on Google : site:www.rapidshare.com keywords

Thus you'll also find a particular page on Wikipedia or any link on P2P (emule, eDonkey) sites.



FICGS is also a Free Internet Correspondence Games Server.

Here you can play Chess, Go & Poker Texas Holdem online for free in rated class tournaments and a unique world championship.

Free Internet Chess & Go Server


Feel free to link to FICGS :