Remote API Error code 1891

Remote API Error code 1891

Hello,

im using the Remote API to save my Documents.
With Zoho Sheet and Show there is no problem saving a Document.
But Zoho Writer always throws the Error 1891 "Invalid URL" while saving, although it uses the same save.php like Sheet and Show.

PHP-Code save.php:

$filepath = getcwd().$_GET["filename"];

    $tmp_filename = $_FILES['content']['tmp_name'];

    $upload_status = move_uploaded_file($tmp_filename, $filepath);
?>

PHP-Code open.php:


$fields = array();
$fields['apikey'] = $api;
$fields['content'] = "@".$filepath;
$fields['filename'] = $filepath;
$fields['id'] = 'sometestid';
$fields['mode'] = 'normaledit';
$fields['lang'] = 'de';
$fields['format'] = $extension;
$fields['output'] = 'url';
$fields['saveurl'] = "http://".$dns."/test/zohosave.php?filename=".$file;

$zohoservice = 'https://exportwriter.zoho.com/remotedoc.im';

$mime = OCP\Files::getMimeType($filepath);
if (($mime == 'application/vnd.oasis.opendocument.text')||($mime == 'application/msword'))
$zohoservice = 'https://exportwriter.zoho.com/remotedoc.im';
if (($mime == 'application/vnd.oasis.opendocument.spreadsheet')||($mime == 'application/msexcel'))
$zohoservice = 'https://sheet.zoho.com/remotedoc.im';
if (($mime == 'application/vnd.oasis.opendocument.presentation')||($mime == 'application/mspowerpoint'))
$zohoservice = 'https://show.zoho.com/remotedoc.im';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $zohoservice);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_VERBOSE,  1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, true);

$page = curl_exec ($ch);
curl_close ($ch);

$headers = explode("
", $page);

//echo print_r($headers);

foreach($headers as $val)
{
if (stripos($val, 'URL=') !== false)
    {
    $url = str_replace('URL=', '', $val);
    //echo '<iframe src="'.$url.'" style="width:100%;height:99%;"></iframe>';
    echo '<frameset rows="100%" border="0" frameborder="0" framespacing="0"><frame src="'.$url.'" name="mainFrame" scrolling="Auto"></frameset>';
    }
}

?>


So why does only Zoho Writer trouble with this code trying to save a document?
Is it a problem, if my DNS contains a number like this: test76.no-ip.org ?

thanks and regards