Callback URLs ( version 2.08 )

144 views
Skip to first unread message

karim beyrouti

unread,
Jul 9, 2014, 11:46:11 AM7/9/14
to
Set a callback URL to post job reports to a server side script (specified by the user) - this was added in Version 2.08. 
The script path can be set using the command line or the Global Settings view, it is persistent between sessions. 

To set the callback URL using the command line see the following:

   CLI - Windows

If enabled, SWFRenderer will post the following variables to a specified script after each SWF is exported:

id : number - internal id of swf ( this gets reset every time the application is opened ) 
fileName : string - prefix filename for the exported files
filePath : string - path to the file to export
exportPath : string - path to export folder
error : boolean - true if there was an error exporting the SWF / false if successfully exported
errorList : string - Error codes / and more information if there was an error exporting the SWF

As an example the following PHP script will write render status to a text file:

<?php

    $id              = $_POST['id'];
    $fileName    = $_POST['fileName'];
    $filePath      = $_POST['filePath'];
    $exportPath = $_POST['exportPath'];
    $error          = $_POST['error'];
    $errorList     = $_POST['errorList'];

    if( isset( $id ))
    {

        $myFile     = "data.txt";
        $fh         = fopen($myFile, 'a') or die("can't open file");
        $stringData = $id . '|' . $error . '|' . $errorList . '|' . $filePath . '|' . $exportPath .'|' . $fileName  ."\n";

        fwrite($fh, $stringData);
        fclose($fh);

}

?>

Reply all
Reply to author
Forward
0 new messages