If you need the PHP to execute from FM 12, you can use something like the SmartPill plugin to do so:
If you have access to an outside PHP-enabled server, you can write the script on that server and trigger from FM12 by loading a custom URL into a web viewer (ie myserver.com/text.php?phone=5551212&message=Hello%20world.)
If you want to POST to the PHP page, you can use something like the Beezwax web services plugin:
I'll leave the authentication up to you, but that should give you a few ideas.
Thank you will try it out...