Get the Unix timestamp for the current date and time:
| <?php $date=date_create(); echo date_timestamp_get($date); ?> | 
The date_timestamp_get() function returns the Unix timestamp.
| date_timestamp_get(object) | 
| Parameter | Description | 
| object | Required. Specifies a DateTime object created by  | 
| Return Value: | Returns the Unix timestamp representing the date. | 
| PHP Version: | 5.3+ |