4

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

meditic
  • 61
  • 1
  • 6

1 Answers1

0

Yes it's possible.

Look at the API in XMPPHP library

http://code.google.com/p/xmpphp/

there are tons of questions here about the same

xmpphp XMPP, send message from php script

http://www.ibm.com/developerworks/xml/tutorials/x-alertxmpptut/section4.html

Community
  • 1
  • 1
Satish
  • 6,457
  • 8
  • 43
  • 63
  • 2
    sorry man, but what I ask is "receiving xmpp msg" instead of "sending xmpp msg". in other words, I need xmpp server to call a php script when a message is received. is it possible? thanks – meditic Oct 30 '11 at 03:32
  • Hi meditic i have also the same problem i have send the message using php and xmpp but i am not able to receive the message. – varun joshi Feb 08 '16 at 06:11