I have PHP+mysql and XMPP server on the same machine, I don't know if it's possible to do this: when client@xmpp sends a message "hello" to PHP@xmpp (e.g. from iPhone), a PHP script on the XMPP server will be automatically called and all variables will be passed over, so that the PHP script can insert this message to mysql.
thank you