- time: documentation ( source)
- getdate: documentation ( source)
- sprintf: documentation ( source)
<?php
$zeit = time();
$datum = getdate($zeit);
$mm = sprintf("%02d", $datum[mon]);
$tt = sprintf("%02d", $datum[mday]);
$hh = sprintf("%02d", $datum[hours]);
$nn = sprintf("%02d", $datum[minutes]);
$ss = sprintf("%02d", $datum[seconds]);
$ts = $datum[year] . $mm . $tt . $hh . $nn . $ss;
echo $ts;