tags:

views:

58

answers:

1

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 1273229613000 .How can i solve this problem.help me please.

+1  A: 

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);
salathe
thank you for your response.sorry to inform you that now it returns only eleven digit timestamp.This is not what i looking for...sorry
Ajith
edited my answer: use `floor` instead of `(int)`
salathe