RSSAll Entries in the "File Management" Category

Timestamp in PHP

In this tutorial I will give you example how to add timestamp to file name in PHP .
This is useful when you create similar files like database backups, regular reports, or whatever you are saving in PHP with timestamp in the file name.

Bellow is an example that creates one CSV file with timestamp in the file name:

The part that sets the timestamp in PHP is:

The file created using this method will be like this: testFile.04-10-2011.csv – certainly with different date.
You can modify the PHP date function and use different formats. For example if you need only the current time for timestamp use:

The file name with this timestamp will be like: testFile.06:18:08.csv

For full timestamp including year-month-day-hour-minute-seconds change the code to:

My file appeared with timestamp: testFile.2011-10-04_06:18:08.csv

Certainly you can use different separators for the timestamp, also there are more options available which can be found at PHP date function page.


Upload files to iPod using Winamp

This tutorial will show you how to install Winamp plug-in and use it to upload files to your Apple iPod.

As you are reading this page probably you are dissatisfied by Apple iTunes, bored waiting for play list rebuilding, or lost what and where to click there.

Most likely iTunes is not so bad if you have master degree for it, but personally I prefer the things happening fast.

In order to use iPod with Winamp you will need a plug-in called ‘ml_ipod’.

As the developers of this add-on said – it’ ‘¦allows you to send and get songs off your iPod from Winamp”s Media Library’:

Download the Winamp’s plug-in from the above link and simply install it.
Then start Winamp, but before that do not forget to close iTunes, because if it is running you will receive an error.