XML valid last edit time from HTTP header response
<p>Good day!</p>

<p>I am trying to generate a sitemap with PHP.
I would like to optimize my code and therefore I was wondering if there is a way to determine the last time a file was modified by analyzing its header (I know it returns the last-modified but the time format is weird and also the position of this information in the $http_response_header array may change). I need something like this:</p>

<pre><code>$html = file_get_contents($file, $context);
magicFunction($http_response_header); //returns last modified date in dd-mm-yyyy format
</code></pre>

<p>Any ideas? I found some solutions on StackOverflow but they all imply extra functions like filemtime or gmtime which I don't need having already the header response in hand.</p>