Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8913527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:29:10+00:00 2026-06-15T04:29:10+00:00

Im trying to take data from Contact Form 7 WordPress plugin and pass it

  • 0

Im trying to take data from Contact Form 7 WordPress plugin and pass it with json to GetResponse API

I have a php file that pull the data and send it, and its looks like this
I’m getting the CF7 email of confirmation but im not getting GetResponse Email confirmation for newsletter, i don’t understand why, i tried to do some debugging and there was no errors

add_action('wpcf7_before_send_mail', 'mytheme_save_to_getresponse', 10, 1);
function mytheme_save_to_getresponse($form)
{
include 'ChromePhp.php';

    require_once 'jsonRPCClient.php';
    $api_key = 'some_api_key';
    $api_url = 'http://api2.getresponse.com';
    $client = new jsonRPCClient($api_url);
    $result = NULL;

try {
    $result = $client->get_campaigns(
        $api_key,
        array (
            # find by name literally
            'name' => array ( 'EQUALS' => 'testcase_001' )
        )
    );
}
catch (Exception $e) {
    # check for communication and response errors
    # implement handling if needed
    die($e->getMessage());
}

$campaigns = array_keys($result);
$CAMPAIGN_ID = array_pop($campaigns);

   $subscriberName =  $_POST['name'];
    $subscriberEmail =  $_POST['email'];
    $subscriberPhone =  $_POST['c_phone'];
    $subscriberCellphone =  $_POST['c_cellphone'];
    $subscriberArea =  $_POST['c_area'];
    $subscriberInsuranceType =  $_POST['c_type'];
    $subscriberCarType =  $_POST['c_cartype'];
    $subscriberManifacture =  $_POST['c_manifacture'];
    $subscriberManifacturemodel =  $_POST['c_manifacturemodel'];
    $subscriberManifactureYear =  $_POST['c_manifactureyear'];
    $subscriberDriverAge =  $_POST['c_driversage'];
    $subscriberPrevent =  $_POST['c_prevent'];
    $subscriberClaim =  $_POST['c_claim'];

try {
    $result = $client->add_contact(
        $api_key,
        array (
            'campaign'  => $CAMPAIGN_ID,
            'name'      => $subscriberName,
            'email'     =>  $subscriberEmail,
            'cycle_day' => '0',
            'customs' => array(
                array(
                    'name'       => 'home_phone',
                    'content'    => $subscriberPhone
                ),
                array(
                    'name'       => 'cell_phone',
                    'content'    => $subscriberCellphone
                ),
                array(
                    'name'       => 'living_area',
                    'content'    => $subscriberArea
                ),
                array(
                    'name'       => 'drivers_age',
                    'content'    => $subscriberDriverAge
                ),
                array(
                    'name'       => 'insurance_type',
                    'content'    => $subscriberInsuranceType
                ),
                array(
                    'name'       => 'car_type',
                    'content'    => $subscriberCarType
                ),
                array(
                    'name'       => 'manifacture_type',
                    'content'    => $subscriberManifacture
                ),
                array(
                    'name'       => 'manifacture_model',
                    'content'    => $subscriberManifacturemodel
                ),
                array(
                    'name'       => 'manifacture_year',
                    'content'    => $subscriberManifactureYear
                ),
                array(
                    'name'       => 'license_loss',
                    'content'    => $subscriberPrevent
                ),
                array(
                    'name'       => 'claims_number',
                    'content'    => $subscriberClaim
                )
            )
        )
    );
}
catch (Exception $e) {
    # check for communication and response errors
    # implement handling if needed
    die($e->getMessage());
}
}

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:29:11+00:00Added an answer on June 15, 2026 at 4:29 am

    everything was OK with this code, i GetResponse don’t send confirmation requests more than once on the same email..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Really struggling to figure this out. Just trying to take in data from php
I'm trying to write a simple php script to take in data from stdin
I'm trying to load data from an external .js file, containing a JSON representation
I have a form that I'm trying to get data from a form using
I am trying to take data from a HTML <form> and generate a report
so i'm trying to do a data migration where i take the listings from
I'm trying to use the entity framework to take data (nested relationships) from one
I am trying to take the raw data from a previously made PDF, and
Has anyone used jquery to take data from one form field and put it
Has anyone used javascript/ajax to take data from one form field and put it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.