Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $vst_hostname = 'dfsdfl.csfdsdsgds.com';
- $postvars = array(
- $vst_username = 'zdeslogin',
- $vst_password = 'zdesparol',
- $vst_returncode = 'yes',
- $vst_command = 'v-add-user',
- $username = 'demo',
- $password = 'd3m0p4ssw0rd',
- $email = 'demo@gmail.com',
- $package = 'default',
- $fist_name = 'Rust',
- $last_name = 'Cohle'
- );
- $postdata = http_build_query($postvars);
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'https://' . $vst_hostname . ':8083/api/');
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
- $answer = curl_exec($curl);
- // Check result
- if($answer == 0) {
- echo "User account has been successfuly createdn";
- } else {
- echo "Query returned error code: " .$answer. "n";
- }
Add Comment
Please, Sign In to add comment