Google "simple php cache tutorial" or see this .
Instead of echoing or printing text on the screen, as you probably are now, create a variable using the string concatenation technique as follows:
$html = '<h3>Weather View</h3>';
foreach( element in your xml feed){
$html .= 'Some more information';
}
//then when done
file_put_contents('weather_cache.txt', $html );
, html, PHP -, , file_get_contents();
, , : ) xml b)