ok I have this code line $my_file = "news_images/uploaded-".$users_file_name;
instead of "uploaded" I want to add the unix time code to make each file unique!, how can I do that? what do I have to add instead or what do I have to do to create the unix time code?
$timestamp = time();
$my_file = "news_images/$timestamp-$users_file_name";
NB: This will get the server's time (which might be in a different time-zone). If you want to adjust the time (eg. subtract 2 hours), change to:
$timestamp = time() - 7200;
On a heavily used system, the timestamp is not necessarily going to be unique. In other environments I've concatenated the timestamp and the process ID, but you don't need to do that in PHP. See tempnam and tmpfile in the manual.
if time() not unique, microtime() will, right?