Hi all,
I’ve been playing around for a few weeks with OpenFire and its plugins. Really cool.
I’ve succesfully setup my Plugin development environment and have been able to edit and build some plugins from source as well. Thanks to the well documented walkthroughs elsewhere on this site.
However I’m stuck at some Java scripting, which shouldn’t give to much problems for a experienced developer. I want to pass each received message from the Parrot Bot Plugin to a PHP-script, which will deal with it, after haver received it.
I’m currently using http://www.igniterealtime.org/community/docs/DOC-1130
at the following piece of code I want to , instead of echo the message/packet back to the sender, invoke a local php script and POST the received message:
public void processIncoming(Packet packet) {
if (packet instanceof Message) {
// Echo back to sender
packet.setTo(packet.getFrom());
bot.sendPacket(packet);
}
}
I’ve been trying quiet some stuff such as URL.connect and so on, but I didn’t manage to succesfully create it.
Any real Java Programmer here who has the solution?
the php script is situated at localhost/index.php
looking forward to your thoughts!
all best, Roeland from Amsterdam