. // PHP interfaces to some of BOINC's Web RPCs // return (authenticator, errmsg) // function create_account( $project_url, $email_addr, $passwd_hash, $user_name ) { $url = $project_url."/create_account.php?email_addr=".urlencode($email_addr)."&passwd_hash=$passwd_hash&user_name=".urlencode($user_name); $reply = file_get_contents($url); if (!$reply) return array(null, "HTTP error"); $r = @simplexml_load_string($reply); if (!$r) { return array(null, "Can't parse reply XML:\n$reply"); } $auth = (string)$r->authenticator; if ($auth) { return array($auth, null); } else { return array(null, "missing auth"); } } function example_usage() { $x = create_account( "http://isaac.ssl.berkeley.edu/test/", "john@a.b.c", "12345678901234567890123456789012", "John Doe" ); print_r($x); } ?>