Jump to content

Recommended Posts

Hello all, this issue really has me stumped. I'm actually a bit unsure of where to start. There are a bunch of files in a directory shown here.

http://dd.weatheroffice.ec.gc.ca/bulletins/alphanumeric/20130911/WU/CWTO/00/

 

What I need to do is get the latest WUCN12 bulletin from the directory. As you can see they have a creation date, however I am unsure of how to grab the latest one of the WUCN12 bulletin.

 

Any help would be great, 

Link to comment
https://forums.phpfreaks.com/topic/282062-get-latest-file-from-directory/
Share on other sites

It seems like the most reliable indicator is not the creation time but the filename suffix.

'/(?Pass that string to preg_match_all, sort the [0] matches in reverse order, and grab the first one.
Edited by requinix
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.