wrenchboard_api($data,$out); echo "=========================================================.....======================================"; var_dump($out); if ($out['internal_return'] == 100){ echo 'Save the session for other use - you will need it'; $myfile = fopen("../../writable/wrench_session.txt", "w") or die("Unable to open file!"); fwrite($myfile, $out['session']); fwrite($myfile, "\n"); fwrite($myfile, $out['member_id']); fwrite($myfile, "\n"); fwrite($myfile, $out['uid']); fclose($myfile); } ?>