I am trying to use OCR SDK in PHP from ABBYY.com for recognizing business cards. I have the following code just to check out how it works. When I execute the code I get a blank output. Where I could be gonig wrong on the code?
$applicationId = "MyBusinessCardReader"; $password = "password"; $filename = "businesscard.jpg"; $localDir = dirname(__FILE__); $url = "http://cloud.ocrsdk.com/processBusinessCard"; $c = curl_init(); curl_setopt($c, CURLOPT_URL, $url); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_USERPWD, "$applicationId:$password"); curl_setopt($c, CURLOPT_POST, 1); $post_array = array( "my_file" => "@$localDir$filename" ); curl_setopt($c, CURLOPT_POSTFIELDS, $post_array); $response = curl_exec($c); curl_close($c); echo "<pre>"; echo $response; echo "</pre>";
The samle business card image can be seen at http://test.goje87.com/vangal/businesscard.jpg