I am using ubuntu(apache) for my php application.i need to create a timestamp for authenticated call of a webservice.In php i getting only 10 digit timestamp like 1273229733.But i need to create like 1开发者_StackOverflow中文版273229613000 .How can i solve this problem.help me please.
The thirteen-digit timestamp is the number of milliseconds (1/1,000) since the Unix epoch (compared to the ten-digit seconds since). PHP has a function to return the timestamp to the microsecond (1/1,000,000) which we can multiply and truncate to get our thirteen-digit timestamp.
$millitimestamp = floor(microtime(TRUE) * 1000);
精彩评论