Printer Friendly Version
Email this thread to a friend
|
Featured Web Site Template |
|
There are 0 guests and 2 members in the forums right now.
Reflects user activity within the last 5 minutes
|
|
| Member |
Message |
karrella
Joined: Aug 19, 2005
# Posts: 41
|
Posted: 03/20/2007 01:59 pm
Once again I have a strange question.
I want to have a special link on my site.
The link is to a text file located on a distributor's website and is named with a specific filename in the same format every week. In other words it's guaranteed predictable.
Here is what the file would look like,
shipping_032107.txt
which means,
shipping_(month)(day)(year).txt
How could I use something to make the link the right name without modifying my page weekly? The one tricky part is that it's updated once a week and it would be Wednesdays date each time. So it actually has to predict the next date. Perhaps if the script couldn't do that it could figure out todays date, check it to the days of the week and add a number to equal the proper day, I have no idea what to start with for this.
Anyone have any ideas?
Thanks
|
 |
david68
Joined: May 16, 2005
# Posts: 144
|
Posted: 03/31/2007 01:26 pm
I don't know how well this will work but...
$file = 'shipping_'.date('mdy', strtotime('last wednesday')).'.txt';
This would be the previous wednesday. Or if the file is NEXT wednesday change to "next".
Also note that TIME ZONE could be a factor. If your server's zone is different the link won't work properly during that time. But, most servers are UTC so I doubt it'll be a problem. You could define the time zone if you know the other server's zone setting.
If it works how about a link-back to my website (see my profile - my site is still under construction but I could use some link-backs)
[ Message was edited by: david68 03/31/2007 02:08 pm ]
|
 |
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
- You have not yet logged in, or registered properly as a member
- You are a member, but no longer have posting rights.
- This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you cannot find this message, click here to Re-Send it.
|
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.
|
Switch to Advanced Editor and ...
Create a New Topic
or Reply to this Thread
|
|