I was wondering if it's possible to fire a function that resides in a completely separate script from the one currently being executed. For example, I am using Drupal and phpBB, and I have a module that integrates certain aspects of each like user sessions, and certain profile information. But if I want to do something like add or delete a user, the only thing I can do is attempt to imitate the SQL that the other script uses. It would be REALLY cool if I could include the phpBB user delete function in Drupal's user delete function, so that when I execute Drupal's user delete function, phpBB's user delete function is also executed just like it would be if I were actually 'using' phpBB's script. Is there a reasonable way to do this?
Just use the include directive to include the function file in whichever file you are calling the function from. For example, I don't know what page the delete user function resides in in phpbb, but you can include the file from your page: include("/phpbbusers.php"); Code (markup): And then just call the function: deleteUser(UserId) - or however it's done with phpBB. But when you include a file you inherit all the functions in that file.
If phpBB has an XML handler like wordpress (xmlrpc.php), you could post transactions to it and operate a forum on remote-control, also on other servers. Includes are simpler.