# PHP date stamp

**URL:** <https://forum.kirupa.com/t/php-date-stamp/66663>\
**Category:** programming\
**Created:** [October 7, 2004, 6:39pm UTC](https://forum.kirupa.com/t/php-date-stamp/66663 "2004-10-07T18:39:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spectreman](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@spectreman](https://forum.kirupa.com/u/spectreman)\
**Post date:** [October 7, 2004, 6:39pm UTC](https://forum.kirupa.com/t/php-date-stamp/66663/1 "2004-10-07T18:39:07Z")

</div>

i was originally looking for the answer to this question in a different forum, but realized it’s a PHP question…

can someone help me add a date stamp to this script??  
it’s for a guestbook

\<?php  
$file = fopen(“guestbook.xml”, “w+”) or die(“Can’t open XML file”);  
$xmlString = $HTTP\_RAW\_POST\_DATA;  
if(!fwrite($file, $xmlString)){  
print “Error writing to XML-file”;  
}  
print $xmlString."  
";  
fclose($file);  
?\>

thanks,  
s.
