API Suspened Users
Re: API Suspened Users
now I worked when I put 'do' along the lines of 'echo'
I really want to thank you for your attention
there is a small problem, the last User does not block, only blocks if I write to the end
http://prntscr.com/8mx0ug
but otherwise it is already working as I wanted, thank you
I really want to thank you for your attention
there is a small problem, the last User does not block, only blocks if I write to the end
http://prntscr.com/8mx0ug
but otherwise it is already working as I wanted, thank you
Re: API Suspened Users
I'm trying to use around and is not working, only manually.
You have to help me.
You have to help me.
Code: Select all
$vst_username = 'admin';
$vst_password = 'NmSmGFbqgH';
$vst_command = 'e-bloquear-users-revenda user1 user2';
$postvars = array(
'user' => $vst_username,
'password' => $vst_password,
'returncode' => 'yes',
'cmd' => $vst_command
);
$postdata = http_build_query($postvars);
// Send POST query via cURL
$postdata = http_build_query($postvars);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://66.85.180.37: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);
if ($answer == 0) {
echo "ok";
} else {
echo "Query returned error code: " . $answer . "\n";
}
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: API Suspened Users
what is the result of $answer? What problem do you have?
Re: API Suspened Users
erro 1 E_ARGS Not enough arguments provided