Results 1 to 3 of 3
-
8th Mar 2012, 07:59 PM #1OPMemberWebsite's:
satiq.netFtp REUpload
Hi, I'm using that comand to upload to ftp with php:
PHP Code:ftp_put($connect, $destination_file, $source_file, FTP_BINARY)
Thanksskinner Reviewed by skinner on . Ftp REUpload Hi, I'm using that comand to upload to ftp with php: ftp_put($connect, $destination_file, $source_file, FTP_BINARY) but how can I reup that file, for example max 5 times, if upload failed? Thanks Rating: 5
-
8th Mar 2012, 08:09 PM #2Member
http://www.w3schools.com/php/func_ftp_put.asp
http://php.net/manual/en/function.ftp-put.php
This function returns TRUE on success and FALSE on failure.PHP Code:$ok=false;
$tries=0;
while (!$ok && $tries<4) {
$tries++;
if (ftp_put($connect, $destination_file, $source_file, FTP_BINARY))
$ok=true;
}
-
8th Mar 2012, 08:10 PM #3MemberPHP Code:
$i = 1
for ($i = 1; $i<6;i++)
{
if (!(ftp_put($connect, $destination_file, $source_file, FTP_BINARY)))
{
$i++;
if ($i >= 5)
{
break;
}
}else{
break;
}
}
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Review: reupload.me
By mcmoore in forum Site ReviewsReplies: 0Last Post: 8th Sep 2012, 01:14 PM -
Just reupload it!
By ReUpload in forum Site ReviewsReplies: 197Last Post: 29th Oct 2011, 08:20 PM -
Reupload service's
By master12 in forum Webmaster DiscussionReplies: 0Last Post: 29th Jun 2011, 03:24 PM -
Do you reupload files in RS-MU?
By elpirata in forum Webmaster DiscussionReplies: 3Last Post: 23rd Feb 2011, 07:20 PM -
Mass Reupload
By vgnheart in forum Completed TransactionsReplies: 3Last Post: 24th Jan 2010, 03:51 PM
themaCreator - create posts from...
Version 3.45 released. Open older version (or...