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