3 require('freeside.class.php');
4 $freeside = new FreesideSelfService();
6 $domain = 'example.com';
8 $response = $freeside->login( array(
9 'username' => strtolower($_POST['username']),
11 'password' => strtolower($_POST['password']),
14 error_log("[login] received response from freeside: $response");
15 $error = $response['error'];
21 $session_id = $response['session_id'];
23 error_log("[login] logged into freeside with session_id=$session_id");
25 // store session id in your session store, to be used for other calls
31 error_log("[login] error logging into freeside: $error");
33 // display error message to user