|
|
@ -33,9 +33,10 @@ class Client
|
|
|
|
curl_setopt($curl, CURLOPT_URL, $url);
|
|
|
|
curl_setopt($curl, CURLOPT_URL, $url);
|
|
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
|
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
|
|
|
curl_setopt($curl, CURLOPT_POST, true);
|
|
|
|
curl_setopt($curl, CURLOPT_POST, true);
|
|
|
|
$headers = ['Content-Type: application/x-www-form-urlencoded'];
|
|
|
|
// $headers = ['Content-Type: application/x-www-form-urlencoded'];
|
|
|
|
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
|
|
|
// curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
|
|
|
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($params));
|
|
|
|
// curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($params));
|
|
|
|
|
|
|
|
curl_setopt($curl, CURLOPT_POSTFIELDS, $params);
|
|
|
|
$response = curl_exec($curl);
|
|
|
|
$response = curl_exec($curl);
|
|
|
|
curl_close($curl);
|
|
|
|
curl_close($curl);
|
|
|
|
return $response;
|
|
|
|
return $response;
|
|
|
|