Exemplo n.º 1
0
function main()
{
    $f = fopen("temp.xml", "w");
    $teams = BoincTeam::enum();
    fwrite($f, "<teams>\n");
    foreach ($teams as $team) {
        handle_team($team, $f);
    }
    fwrite($f, "</teams>\n");
    fclose($f);
    rename("temp.xml", "/home/boincadm/boinc/doc/boinc_teams.xml");
}
Exemplo n.º 2
0
function main()
{
    echo "------------ Starting at " . time_str(time()) . "-------\n";
    $f = fopen("temp.xml", "w");
    $teams = BoincTeam::enum(null);
    fwrite($f, "<teams>\n");
    foreach ($teams as $team) {
        handle_team($team, $f);
    }
    fwrite($f, "</teams>\n");
    fclose($f);
    if (!rename("temp.xml", "/home/boincadm/boinc/doc/boinc_teams.xml")) {
        echo "Rename failed\n";
    }
}
Exemplo n.º 3
0
function main()
{
    $f = fopen("http://boinc.berkeley.edu/boinc_teams.xml", "r");
    if (!$f) {
        echo "Can't get times file\n";
        exit;
    }
    while ($s = fgets($f)) {
        if (strstr($s, '<team>')) {
            handle_team($f);
        }
    }
}
Exemplo n.º 4
0
function main()
{
    echo "------------ Starting at " . time_str(time()) . "-------\n";
    $f = fopen("http://boinc.berkeley.edu/boinc_teams.xml", "r");
    if (!$f) {
        echo "Can't get times file\n";
        exit;
    }
    while ($s = fgets($f)) {
        if (strstr($s, '<team>')) {
            handle_team($f);
        }
    }
    echo "------------ Finished at " . time_str(time()) . "-------\n";
}