PHP Classes

PHP FTP Send File: Send or resume uploading files to a FTP server

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-10 (3 days ago) RSS 2.0 feedStarStarStarStar 70%Total: 565 This week: 9All time: 5,400 This week: 27Up
Version License PHP version Categories
ftp-sender 1.0.9GNU General Publi...5Networking, PHP 5, Files and Folders
Description 

Author

This class can send or resume uploading files to a FTP server.

It can open a remote file for writing given a stream URL. The file is overwritten if already exists.

The class uploads the contents of a local file to the remote server file.

It writes a block of data at a time and if it fails writing to the remote file, it retries up to a given number of attempts appending data to the remote file from the point it stopped.

The class verifies the integrity of the upload by comparing the MD5 hash of the local file with the MD5 hash of the file sent to the server.

Picture of Everton da Rosa
  Performance   Level  
Name: Everton da Rosa <contact>
Classes: 17 packages by
Country: Brazil Brazil
Innovation award
Innovation award
Nominee: 3x

Recommendations

What is the best PHP FTP file upload class?
Send files to a secure FTP site

Example

<?php

/*
 * Copyright (C) 2014 Everton
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

require 'ftpsender.class.php';

$sender = new FtpSender();

$sender->send('C:/sample/file.zip', 'ftp://username:password@ftpserver.com:21/path/file.txt');


  Files folder image Files  
File Role Description
Plain text file ftpsender.class.php Class Class source
Accessible without login Plain text file sample.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:565
This week:9
All time:5,400
This week:27Up
User Ratings User Comments (1)
 All time
Utility:100%StarStarStarStarStarStar
Consistency:100%StarStarStarStarStarStar
Documentation:-
Examples:100%StarStarStarStarStarStar
Tests:-
Videos:-
Overall:70%StarStarStarStar
Rank:404
 
Thats a good and interesting class ;-)
9 years ago (José Filipe Lopes Santos)
70%StarStarStarStar