There was a minor bug here:

if (time()- filemtime("eurofxref-daily.xml") > 36000) {
^ space missing in code

More...