Project Detail

Quick PHP Function Fix  

Quick PHP Function Fix is project number 347949
posted at Freelancer.com. Click here to post your own project.

 

| More Free Trial For New Buyers
 

Status:

Selected Providers: shuiwatermizu

Budget: $30-250

Created: 11/23/2008 at 17:46 EST

Bid Count: 4

Average Bid:
$ 30

12/03/2008 at 17:46 EST

Project Creator: brokerwebsites
Employer Rating: 10/1010/1010/1010/1010/1010/1010/1010/1010/1010/10 (14 reviews)

Bid On This Project
 

Description

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.

Messages Posted:0 View project clarification board Post message on project clarification board

Bid On This Project
 

If you are the project creator or one of the bidders Log In for more options

 

30

0 days

11-23-2008 20:32 EST

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 SQL Server, .Net, Ajax, CSS, DHTML, XHTML, XML, Javascript, Web promotion, SEO, Link building, Wordpress, Able dating and personals site, classifieds script, Data Processing, Script Intallation, System Admin, develop a full site, security etc…. I am ready to start doing your project. I assure you that you will get 100% satisfaction. I am very pleasure if I can get a chance to work with you. I am hoping and hearing from you. Thank you very much.

help

 

30

0 days

11-23-2008 17:55 EST

let's do it

help

 

30

1 day

11-23-2008 18:41 EST

Escrow payment is required ... http://www.unknownsoftware.ro

help

 

30

1 day

11-23-2008 19:26 EST

Consider it done.

help


    Bid on this Project