Forum Moderators: coopster
You can readdir [us3.php.net] the directory and match the file based on the pattern in the different filenames.
I can't figure this one out
2/
[YYYYYY.com...]
[YYYYYY.com...]
[YYYYYY.com...]
[YYYYYY.com...]
I can't figure this one out
3/
[sub.us.ZZZZ.com...]
[sub.us.ZZZZ.com...]
[sub.us.ZZZZ.com...]
[sub.us.ZZZZ.com...]
This one I came up with the following solution:
<?php
$MarketUpdateTime1 = date('Y-m-d');
echo '<a href=https://sub.us.ZZZZ.com/Last/Path/' . $MarketUpdateTime . '-a/nybrok.pdf>TEST</a>';
?>
Problems.
1/ This may cancel out everything that I'm trying to do, If the link is going to be php based like the example in (3), I am in problems because I need to place it in mysql and it does not seem to work from there.
2/ I don't see how to read dir in another url. From what I see and have tried the readdir is for your own dir. I need to read another url.
3/ With last problem is, these really have to search for the most recent date, because on weekend for example, there wont be a new file, and sometimes a couple days go by without a new file. So (3) for example would cause problems on Sat, Sun, even a holiday. (1) you'll notice there is no link for the 14th, that's because there was no new file on the 14th, so that would have caused a problem if someone went for a file on the 14th.
NOTE: what I was thinking is doing 'filemtime' and if a file has a "filemtime" that is greater than yesterday, grab that. What are your thoughts on that? The only problem is, I don't know what else may be in that directory, and that wouldn't work for (3). So that probably isn't a good idea anyway.
Thanks for any and all help.