• Resolved tbadorrek

    (@tbadorrek)


    Hi all,

    I’m trying to add another function that will submit the email address from a form to my FeedBlitz subscription. Here is the function that FeedBlitz supplies, but I’m not sure where to implement and call it in the function. Any thoughts???

    // utility PHP function to fetch any arbirary URL for the sake of the example
    // obviously use your own preferred function if you wish!

    function fbz_get_web_page( $url ){

    $options = array(
    CURLOPT_RETURNTRANSFER => true, // return web page
    CURLOPT_HEADER => false, // don’t return headers
    CURLOPT_FOLLOWLOCATION => true, // follow redirects
    CURLOPT_ENCODING => “”, // handle all encodings
    CURLOPT_USERAGENT => “PHP FeedBlitz Web Form Handler”, // who am i
    CURLOPT_AUTOREFERER => true, // set referer on redirect
    CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect
    CURLOPT_TIMEOUT => 120, // timeout on response
    CURLOPT_MAXREDIRS => 10, // stop after 10 redirects
    );

    $ch = curl_init( $url );
    curl_setopt_array( $ch, $options );
    $content = curl_exec( $ch );
    $err = curl_errno( $ch );
    $errmsg = curl_error( $ch );
    $header = curl_getinfo( $ch );
    curl_close( $ch );
    $header[‘errno’] = $err;
    $header[‘errmsg’] = $errmsg;
    $header[‘content’] = $content;
    return $header;
    }

    // define the FeedBlitz API URL to GET once you know that the user has agreed to subscribe using your form
    $page=’https://www.feedblitz.com/f?apisubscriber=’.$email.’&feedid=84&key=’.$ApiKey;

    fbz_get_web_page($page);

    https://www.ads-software.com/extend/plugins/salesforce-wordpress-to-lead/

Viewing 1 replies (of 1 total)
  • Plugin Author Nick Ciske

    (@nickciske)

    Add it around line 732 after the remote post to SF.

    $_POST[’email’] has the user’s email address. You’ll want to sanitize that a bit (and urlencode it) before submitting it via a GET.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WordPress-to-lead for Salesforce CRM] Adding another function’ is closed to new replies.