Mark,
I am a PHP newbie myself so my way of doing this (see below) might not be ideal and actually other developers, anyone good at PHP and good at PHP/Aware IM integration that have tips for doing this another, better way, please chip in.
Here is what I do:
I use a batch file to execute the script (script.bat):
"C:\Program Files (x86)\PHP\v5.5\php.exe" -f "C:\Scripts\phpunicode.php"
I use Aware IM tags in the PHP script:
<?php
$text = "<<Sms.Message>>";
$arr = unpack('H*hex', iconv('UTF-8', 'UCS-2BE', $text));
$add = strtoupper($arr['hex']);
$f = fopen("C:\Scripts\output.txt", "w");
fwrite($f, $add);
fclose($f);
?>
I use a Aware IM txt document template that I export as part of SMS convert process:
EXPORT DOCUMENT PhpUnicode TO FILE 'C:\Scripts\phpunicode.php'
I use Aware IM EXECUTE PROGRAM to execute the bat file / script:
EXECUTE PROGRAM 'C:\Scripts\script.bat'
I use Aware IM URL_CONTENTS to read the output.txt file back to Aware IM:
Sms.Unicode=URL_CONTENTS('file:\\\C:\Scripts\output.txt')
I am working on a queue solution where SMS if created simultaneously, the SMS will get a execution no and will be executed in order (part of this solution might also be actions to delete previous php and output etc. files).