public static function run($r) { echo PHP_EOL . 'If you have not already registered for your free OpenBenchmarking.org account, you can do so at http://openbenchmarking.org/' . PHP_EOL . PHP_EOL . 'Once you have registered your account and clicked the link within the verification email, enter your log-in information below.' . PHP_EOL . PHP_EOL; echo 'User-Name: '; $username = pts_user_io::read_user_input(); echo 'Password: '******'s_u' => $username, 's_p' => sha1($password), 's_s' => base64_encode(phodevi::system_software(true)), 's_h' => base64_encode(phodevi::system_hardware(true))); $login_state = pts_openbenchmarking::make_openbenchmarking_request('account_login', $login_payload); $json = json_decode($login_state, true); if (isset($json['openbenchmarking']['response']['error'])) { trigger_error($json['openbenchmarking']['response']['error'], E_USER_ERROR); pts_storage_object::remove_in_file(PTS_CORE_STORAGE, 'openbenchmarking'); } else { $openbenchmarking_payload = array('user_name' => $json['openbenchmarking']['account']['user_name'], 'communication_id' => $json['openbenchmarking']['account']['communication_id'], 'sav' => $json['openbenchmarking']['account']['sav']); pts_storage_object::set_in_file(PTS_CORE_STORAGE, 'openbenchmarking', $openbenchmarking_payload); echo PHP_EOL . PHP_EOL . 'The Account Has Been Setup.' . PHP_EOL . PHP_EOL; } }