added messages list, new client form, logic for client Apps plus others
This commit is contained in:
@@ -50,7 +50,32 @@ class ApiCalls
|
||||
curl_close($curl);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
public static function CurlPatch($data, $url){
|
||||
$patch_url = env('APIBASEURL') . $url;
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt_array($curl, array(
|
||||
CURLOPT_URL => $patch_url,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_ENCODING => '',
|
||||
CURLOPT_MAXREDIRS => 10,
|
||||
CURLOPT_TIMEOUT => 0,
|
||||
CURLOPT_FOLLOWLOCATION => true,
|
||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
CURLOPT_CUSTOMREQUEST => 'PATCH',
|
||||
CURLOPT_POSTFIELDS => $data,
|
||||
CURLOPT_HTTPHEADER => array(
|
||||
'Content-Type: application/json'
|
||||
),
|
||||
));
|
||||
|
||||
$response = curl_exec($curl);
|
||||
|
||||
curl_close($curl);
|
||||
echo $response;
|
||||
|
||||
}
|
||||
|
||||
public static function generatePassword($length = 10) {
|
||||
return bin2hex(random_bytes($length / 2));
|
||||
|
||||
Reference in New Issue
Block a user