Infusionsoft Hack #2. Using the HTTP Post

There are a lot of things Infusionsoft does that most of us will probably never know how to do/us or what have you. But I think that the most likely to baffle most none coders is the HTTP post element of the campaign builder. So what does it actually do?

Well, an HTTP POST is an internet protocol that transfers information from one place to another in a secure form.

Well how is that useful in any way shape or form? For most people, it probably isn’t. Yeah… so helpful.

But! You can accomplish some pretty cool stuff.

For Example:

I want a WordPress membership website, but I don’t have the budget for fancy software like Memberium or anything like that after the cost of Infusionsoft. So I have to do it myself, the old fashioned way.

I want registration to be handled through Infusionsoft, and then have the person added as a user in WordPress so they can access the content within. No problem when using the HTTP post!

Here is the HTTP post in infusionsoft.
http

Here are the fields you should pass to the php file on your server.
capture

This is the code in the file!

<?php
/**
 * Plugin Name: TBP Members
 * Description: Membership functionality to WP
 * Version: 0.1
 * Author: Adrian Tobey
 * Author URI: https://www.trainingbusinesspros.com/the-team/
 *
 * Copyright (c) Training Business Pros 2016
 * 25 Lesmill Road, Toronto, Ontario, July 2016
 */

$member_params = $_POST;

foreach ($member_params as $param=>$value){
    $member_params[$param] = sanitize_text_field($value);
}

$user_email = $member_params['Email'];
$first_name = $member_params['FirstName'];
$last_name = $member_params['LastName'];
$password = $member_params['password'];

$user_id = username_exists( $first_name."_".$last_name );
if ( !$user_id and email_exists($user_email) == false ) {
    $user_id = wp_create_user( $first_name."_".$last_name, $password, $user_email );
}
if (is_wp_error($user_id)){
    //do something like try again with a variation of the info or create a seperate contact.
}

This is a little bit of code I do not encourage you to use as-is as it is rather insecure. Modify it to make sure it is secure, perhaps by creating custom fields and passing a secret key to ensure the POST is coming from Infusionsoft. You can then copy it over and over again for yourself or your clients. You can download the source code by clicking here.

The url of where you should post to should look something like “http://yoursite.com/wp-content/plugins/inf-add-member/acmp-add-member.php”

All it does, very simply, is create a WordPress User. Nothing fancy, but when activated it automatically creates a user with a First Name, Last Name, Email, and Password.
This could be fantastic for open source projects and membership websites running on WordPress.

What else can the HTTP post do? If you have a system that can create CSV files can track all user data at any point in time when a contact passes through the HTTP POST element. Or.. you can… yeah I’m kind of out of ideas for that.

But none the less the it’s a pretty cool and a horribly underappreciated feature of Infusionsoft.

SIGN UP FOR MORE HACKS
About Adrian Tobey 10 Articles
Adrian Tobey is the Director of Marketing at Training Business Pros. Adrian is responsible for planning and execution all internal marketing strategies as well as the marketing strategies for many of TBP's Clients. In his spare time Adrian produce's a software called FormLift for infusionsoft & WordPress users.

4 Comments

    • Hi Mark, you can post to a third party form via ajax, or via PHP. It depends on which you need. If you are posting from Infusionsoft all you have to do is find the URL that the web form is posting to, and set that up as the POST URL in the Infusionsoft HTTP post.

      For example, if you wanted to post from Infusionsoft to another Infusionsoft form for whatever reason, get the HOSTED URL for the web form and set that up as the POST URL in the HTTP POST.

Leave a Reply to Mark Cancel reply

Your email address will not be published.


*