示例#1
0
    //     if (array_search('--http', $argv)) {
    //         $socket = new THttpClient('localhost', 8888, '/chdserver.php');
    //     } else {
    //         $socket = new TSocket('localhost', 9090);
    //     }
    $socket = new THttpClient('221.7.13.207', 8080, '/chdserver.php');
    //     $socket = new THttpClient('localhost', 8888, '/chdserver.php');
    $transport = new TBufferedTransport($socket, 1024, 1024);
    $protocol = new TBinaryProtocol($transport);
    $client = new \proto\CloudHardDiskServiceClient($protocol);
    $transport->open();
    $mobile = '13989497004';
    $passwd = 'aerohive';
    $cat = '2776';
    $captcha = 'netdisk_delete';
    $ret = $client->DeleteUser($mobile, $captcha);
    var_dump($ret);
    $uspace = $client->RegistUser($mobile, $passwd, $cat);
    var_dump($uspace);
    $auth_ret = $client->loginAuth($mobile, $passwd, 1);
    echo "===3===<br />";
    var_dump($auth_ret);
    $transport->close();
} catch (TException $tx) {
    print 'TException: ' . $tx->getMessage() . "\n";
}
?>



<?php