Advertisement
chrishajer

Openfire GET request (revised)

Aug 3rd, 2012
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <?php
  2. // http://www.gravityhelp.com/forums/topic/integrate-openfire-registration-to-gravity-forms
  3. add_action('gform_after_submission_2', 'post_to_openfire', 10, 2);
  4. function post_to_openfire($entry, $form) {
  5.         $post_url = "http://localhost.com:9090/plugins/userService/userservice?type=add&secret=bigsecret&username=" . $entry['5'] . "&password=" . $entry['2'] . "&name=franz&email=" . $entry['3'];
  6.         $request = new WP_Http;
  7.         $result = $request->request($post_url);
  8.         $json = $result['body'];
  9.         // do something with your $json result if you like
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement