34 lines
1.0 KiB
PHP
34 lines
1.0 KiB
PHP
<?php
|
|
include_once('def.php');
|
|
include('wrenchboard_class.php');
|
|
$wrenchboard = new wrenchboard_class();
|
|
|
|
|
|
$email = 'ses66181+1@gmail.com';
|
|
|
|
$data['username'] = $email;
|
|
$data['password'] = 'may12002';
|
|
$data['loc'] = "38.101.241.200";
|
|
$data['sessionid'] = rand(10000,99999)."A".rand(10000,99999); // dummy for a start
|
|
$data['action'] = WRENCHBOARD_GOOGLE_LOGIN;
|
|
$data['login_channel'] = LOGIN_GOOGLE;
|
|
|
|
$out = array();
|
|
$ret = $wrenchboard->wrenchboard_api($data,$out,'authlogin');
|
|
|
|
|
|
echo "=========================================================.....======================================";
|
|
var_dump($out);
|
|
|
|
if ($out['internal_return'] == 100){
|
|
echo 'Save the session for other use - you will need it';
|
|
$myfile = fopen("../../writable/wrench_googgle-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);
|
|
}
|
|
|
|
?>
|