Created
March 15, 2014 07:44
-
-
Save TyrfingMjolnir/9563119 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// name might have to be: myfunkyscript.php.xml for FileMaker to accept this as an XML-source. | |
require_once( '/opt/FXphp/FX.php' ); | |
require_once( '/opt/mercutio/log.php' ); | |
require_once( '/opt/mercutio/local.php' ); | |
require_once( '/opt/mercutio/supplier.php' ); | |
require_once( '/opt/mercutio/client.php' ); | |
$id = $_GET['id']; | |
$log = log( $id ); // I log to postgreSQL | |
$fbLocalDB = queryLocal( $id ); // I query local DBs; WPE, postgreSQL, mariaDB, etc | |
$fbSupplier = queryMySupplier( $id ); // I give instructions to supplier via SOAP | |
$fbClient = queryMyClient( $id ); // I give feedback to client via SOAP | |
// Before I log the execution in FileMaker as follows: | |
echo <<<OUTPUT | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult"> | |
<ERRORCODE>0</ERRORCODE> | |
<PRODUCT BUILD="03-21-2013" NAME="FileMaker" VERSION="CCL"/> | |
<DATABASE DATEFORMAT="D.m.yyyy" LAYOUT="" NAME="Log" RECORDS="1" TIMEFORMAT="k:mm:ss "/> | |
<METADATA> | |
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="id" TYPE="NUMBER"/> | |
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="log" TYPE="TEXT"/> | |
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="feedbackLocalDB" TYPE="TEXT"/> | |
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="feedbackSupplier" TYPE="TEXT"/> | |
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="feedbackClient" TYPE="TEXT"/> | |
</METADATA> | |
<RESULTSET FOUND="1"> | |
<ROW MODID="0" RECORDID="0"> | |
<COL><DATA>$id</DATA></COL> | |
<COL><DATA>$log</DATA></COL> | |
<COL><DATA>$fbLocalDB</DATA></COL> | |
<COL><DATA>$fbSupplier</DATA></COL> | |
<COL><DATA>$fbClient</DATA></COL> | |
</ROW></RESULTSET></FMPXMLRESULT> | |
OUTPUT | |
// *CCL The author cracking jokes on us? Couldn't Care Less *LOL* | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment