Jump to content

File getting under conditions


Asheeown

Recommended Posts

I have a program that gets a file from a website ungzips it and inputs that data into the database, however I would like to put this file onto a cron job and have it download the most recent file that hasn't already been downloaded.

Just say it if you need any more detail to fully understand
Link to comment
Share on other sites

These are provided by the company we use for tracking

[quote]
cdr_20070121000000-daily.csv.gz
[/quote]
the name includes the the year first "2007", in this case, then the month "01", in this case, then it has a unique id after the month and that would be "21" for this one
Link to comment
Share on other sites

Well I can use a database table to compare what i'm downloading but the problem is downloading files that I'm not even sure are there.

Meaning when you do a file script and plain and simple call the file by saying file(file.gz) but when I want to run this script on a cronjob and have it automated how will php get all the file names from the directory?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.