Sedang Disiapkan

Quick PHP Function Fix

I had a guy fix my script for me for $30 now I can't find where I put it so I need it done again.

Basically I have an FTP script written in PHP which works just fine providing the file names I'm downloading are KNOWN, meaning If I know the name of the files, I simply hard code them into the array and it works just fine. I have another PHP snippet that determines the most recent file based on time stamp. Its all of about 9 lines of code.

WHAT I NEED TO REHIRE OR HIRE SOMEONE TO DO IS THIS!

Replace the small array where I hard code the files to be downloaded with code to download the LAST or Most Recent file based on time stamp.

Thats it!

################ QUICK EXAMPLE OF THE CODE ###################

$files=array(

"Data/dat-full--20081118_010831.zip",

"Support/support-full--20081118_010522.zip",

"Photos/img-update--20081122_010213.zip"

);

As you can see above those three files mentioned, I have to manually put into this very small array.

HERE IS SOME OF MY CODE FROM AN EXTRACT SCRIPT I HAD A PROGRAMMER PUT TOGETHER FOR ME IN LIKE 5 MINUTES. HE WAS QUITE FAST.

////////////////////////////////////////////////////////////////

// FILE FINDING CODE

////////////////////////////////////////////////////////////////

$dir = "/var/www/vhosts/livedemosite.com/httpdocs/projects/extract/photos/";

$pattern = '.(zip)$';

$newstamp = 0;

$newname = "";

$dc = opendir($dir);

while ($fn = readdir($dc)) {

//Eliminate current directory, parent directory

if (ereg('^.{1,2}$',$fn)) continue;

//Eliminate other pages not in pattern

if (! ereg($pattern,$fn)) continue;

$timedat = filemtime("$dir/$fn");

if ($timedat > $newstamp) {

$newstamp = $timedat;

$newname = $fn;

}

}

//$timedat is the time for the latest file

//$newname is the name of the latest file

// END FILE FINDING CODE

$unzip = unzip_photos($dir.$newname,"/var/www/vhosts/livedemosite.com/httpdocs/projects/extract/photos2");

CAN SOMETHING SIMILAR BE APPLIED TO MY SCRIPT FOR FTP DOWNLOADS TO GET THE LATEST FILE IN THE DIRECTORY.

I CAN ZIP UP THE PROJECT FOLDER FOR SOMEONE, ITS QUITE SMALL, ABOUT 3KB, VERY SMALL SCRIPT.

Kemahiran: PHP

Lihat lebih lanjut: timedat newname, where to find some programmer, where i can find programmer, where i can find a programmer, where find programmer works, where find a programmer, where do i get a programmer, where can i find programmer, what is the fix, unzip ftp, quick hire, programmer names, php function for, need php programmer fast, my fix com, meaning of hire, it programmer names, hire programmer for php, hire meaning, hire a programmer project based, hard to find a programmer, get php projects, get my fix, ftp unzip, fix support

Tentang Majikan:
( 20 ulasan ) American Fork, United States

ID Projek: #347949

Dianugerahkan kepada:

shuiwatermizu

let's do it

$30 USD dalam 0 hari
(95 Ulasan)
6.4

4 pekerja bebas membida secara purata $30 untuk pekerjaan ini

BestWeb4U

Dear Sir/Madam I can do this project best possible. I am a expert, in making website designs, graphic designs, logo designs, banner, flash,OSCommerce, Joomla, DotnetNuke, PHP/Mysql, ASP, ASP.Net, Smarty, Access, MS SQ Lagi

$30 USD dalam 0 hari
(161 Ulasan)
7.5
unknownsoftware

Escrow payment is required ... [url removed, login to view]

$30 USD dalam sehari
(136 Ulasan)
5.9
calavera

Consider it done.

$30 USD dalam sehari
(6 Ulasan)
3.9