$postdata = array(
'method' => 'post',
'key' => $apikey,
'file' => new \CurlFile($filename,'image/jpg'),
'phrase' => $is_phrase,
'regsense' => $is_regsense,
'numeric' => $is_numeric,
'min_len' => $min_len,
'max_len' => $max_len,
'is_russian' => $is_russian
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://$domain/in.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
$result = curl_exec($ch);
The result response is:
Uncaught Error: Class 'CurlFile' not found in ...
Im running on PHP7.
So why?