Error when launch script by server (cron job)

i create script OCR via curl/php and work perfect when i launch it via url in navigator But when do this scipt via server (cron job) i get error:
“{“OCRExitCode”:99,“IsErroredOnProcessing”:true,“ErrorMessage”:[“Unable to recognize the file type”],“ProcessingTimeInMilliseconds”:“15”}”

How i can fix this? thanks

What is navigator? And do you use the same URL for both tests?

i use google chrome. yes is same url

How do you call the API? Do you use curl? Please post the complete cron job.

yes i curl via php

$url_file=$url_scann.$filename;
$url=“https://api.ocr.space/parse/imageurl?apikey=“.$apiKey.”&url=“.$url_file.”&isOverlayRequired=true&OCREngine=1&Language=ita&isTable=true”;
$ch = curl_init($url); // Initialise cURL

   $authorization = "apikey: ".$apiKey; // Prepare the authorisation token
   curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json' , $authorization )); // Inject the token into the header
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 
   curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // This will follow any redirects
   $result = curl_exec($ch); // Execute the cURL statement

   curl_close($ch); // Close the cURL connection

   $result= json_decode($result,true); // Return the received data

when i move my script on other server the script return same error on navigator:
{“status”:“KO”,“error”:{“OCRExitCode”:99,“IsErroredOnProcessing”:true,“ErrorMessage”:[“Unable to recognize the file type”],“ProcessingTimeInMilliseconds”:“350”}}