Example #1
0
function tla_updateLocal($url, $file, $time_out)
{
    touch($file);
    if ($xml = file_get_contents_tla($url, $time_out)) {
        if ($handle = fopen($file, 'w')) {
            fwrite($handle, $xml);
            fclose($handle);
        }
    }
}
Example #2
0
function tla_updateLocalXML($url, $file, $time_out)
{
    if ($handle = fopen($file, "a")) {
        fwrite($handle, "\n");
        fclose($handle);
    }
    if ($xml = file_get_contents_tla($url, $time_out)) {
        $xml = substr($xml, strpos($xml, '<?'));
        if ($handle = fopen($file, "w")) {
            fwrite($handle, $xml);
            fclose($handle);
        }
    }
}