30,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => $data,
CURLOPT_HEADER => 0,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_HTTPHEADER => [
'Expect:',
'Content-Type: application/x-www-form-urlencoded', //UTF-8 implied
'Content-Length: ' . strlen($data)
]
]/* + $this->curlopts*/);
$r = curl_exec($ch);
$err = curl_error($ch);
if ($err) {
curl_close($ch);
die("Curl Error: " . $err . "
");
}
if ($r === false) {
curl_close($ch);
die("CURL: curl-exec failed, check PHP-CURL installation");
}
curl_close($ch);
echo $r;