better check valid timestamp

credit: https://gist.github.com/sepehr/6351385

now, the timestamp input no need to be string only. it can be timestamp
directly from php time() function (integer).