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 (2 months ago) RSS 2.0 feedStarStarStarStar 70%Total: 569 This week: 1All time: 5,385 This week: 560Up
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
Age: 42
All time rank: 78856 in Brazil Brazil
Week rank: 51 Up3 in Brazil Brazil Up
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:569
This week:1
All time:5,385
This week:560Up
User Ratings User Comments (1)
 All time
Utility:100%StarStarStarStarStarStar
Consistency:100%StarStarStarStarStarStar
Documentation:-
Examples:100%StarStarStarStarStarStar
Tests:-
Videos:-
Overall:70%StarStarStarStar
Rank:286
 
Thats a good and interesting class ;-)
9 years ago (José Filipe Lopes Santos)
70%StarStarStarStar