Keeping Tennessee Healthy
Call Us Free: 1-877-224-2052

Quotes Should Appear Within 30 Seconds…
// echo(‘


‘);
$url_param = ‘http://www.hsaagentresource.com/hsa/process.php?action=search&firstname=’.$_GET[‘FirstName’].’&lastname=’.$_GET[‘LastName’].’&email=’.$_GET[‘Email’];

if (function_exists(‘curl_action’)) {
// this means curl_action exists
} else {
echo ‘error no curl_action function';
exit;
}

$return = curl_action(null, $url_param, false);
$arr_return1 = explode(‘ ‘, $return, 8);
$number = substr($arr_return1[3],20,-13);
// query infusionsoft to get data
$url_param = ‘http://www.hsaagentresource.com/hsa/process.php?action=load&id=’.$number;
$return = curl_action(null, $url_param, false);

// try to get owner id from return value
$arr_return = explode(‘|’, $return, 15);
// print_r($arr_return);
// echo(‘


‘);

$applicant_dob1 = explode(‘/’, $_GET[‘a_dob’], 3);
$spouse_dob1 = explode(‘/’, $_GET[‘s_dob’], 3);
$dependent1_dob1 = explode(‘/’, $_GET[‘d1_dob’], 3);
$dependent2_dob1 = explode(‘/’, $_GET[‘d2_dob’], 3);
$dependent3_dob1 = explode(‘/’, $_GET[‘d3_dob’], 3);
$dependent4_dob1 = explode(‘/’, $_GET[‘d4_dob’], 3);
$dependent5_dob1 = explode(‘/’, $_GET[‘d5_dob’], 3);
$applicant_phone = explode(‘ ‘, $arr_return[3]);
$arr_return[3] = $applicant_phone[0].”%20″.$applicant_phone[1];
$street1 = str_replace(” “,”+”,$_GET[‘StreetAddress1′]);
$city1 = str_replace(” “,”+”,$_GET[‘Contact0City’]);

$arr_get = array();
$arr_get[1] = isset($_POST[1]) ? $_POST[1] : ‘https://www.brokeroffice.com/leads/leadImport.jsp?subscriber_id=’.$arr_return[13];
$arr_get[2] = isset($_POST[2]) ? $_POST[2] : ‘customer_number=226322&lead_type=Health';
$arr_get[3] = isset($_POST[3]) ? $_POST[3] : ‘first_name=’.$_GET[‘FirstName’];
$arr_get[4] = isset($_POST[4]) ? $_POST[4] : ‘last_name=’.$_GET[‘LastName’];
$arr_get[5] = isset($_POST[5]) ? $_POST[5] : ‘email=’.$_GET[‘Email’];
$arr_get[6] = isset($_POST[6]) ? $_POST[6] : ‘phone=’.$arr_return[3];
$arr_get[7] = isset($_POST[7]) ? $_POST[7] : ‘address_1_street1=’.$street1;
$arr_get[8] = isset($_POST[8]) ? $_POST[8] : ‘address_1_city=’.$city1;
$arr_get[9] = isset($_POST[9]) ? $_POST[9] : ‘address_1_state=’.$_GET[‘Contact0State’];
$arr_get[10] = isset($_POST[10]) ? $_POST[10] : ‘address_1_zip=’.$_GET[‘zip’];
$arr_get[11] = isset($_POST[11]) ? $_POST[11] : ‘insured_1_dobMM=’.$applicant_dob1[0];
$arr_get[12] = isset($_POST[12]) ? $_POST[12] : ‘insured_1_dobDD=’.$applicant_dob1[1];
$arr_get[13] = isset($_POST[13]) ? $_POST[13] : ‘insured_1_dobYYYY=’.$applicant_dob1[2];
$arr_get[14] = isset($_POST[14]) ? $_POST[14] : ‘insured_1_gender=’.substr($_GET[‘a_gen’],0,1);
$arr_get[15] = isset($_POST[15]) ? $_POST[15] : ‘insured_1_smoker=’.$_GET[‘a_sm’];
$arr_get[16] = isset($_POST[16]) ? $_POST[16] : ‘insured_2_dobMM=’.$spouse_dob1[0];
$arr_get[17] = isset($_POST[17]) ? $_POST[17] : ‘insured_2_dobDD=’.$spouse_dob1[1];
$arr_get[18] = isset($_POST[18]) ? $_POST[18] : ‘insured_2_dobYYYY=’.$spouse_dob1[2];
$arr_get[19] = isset($_POST[19]) ? $_POST[19] : ‘insured_2_gender=’.substr($_GET[‘s_gen’],0,1);
$arr_get[20] = isset($_POST[20]) ? $_POST[20] : ‘insured_2_smoker=’.$_GET[‘s_sm’];
$arr_get[21] = isset($_POST[21]) ? $_POST[21] : ‘insured_3_dobMM=’.$dependent1_dob1[0];
$arr_get[22] = isset($_POST[22]) ? $_POST[22] : ‘insured_3_dobDD=’.$dependent1_dob1[1];
$arr_get[23] = isset($_POST[23]) ? $_POST[23] : ‘insured_3_dobYYYY=’.$dependent1_dob1[2];
$arr_get[24] = isset($_POST[24]) ? $_POST[24] : ‘insured_3_gender=’.substr($_GET[‘d1_gen’],0,1);
$arr_get[25] = isset($_POST[25]) ? $_POST[25] : ‘insured_3_smoker=’.$dependent1_smoker;
$arr_get[26] = isset($_POST[26]) ? $_POST[26] : ‘insured_4_dobMM=’.$dependent2_dob1[0];
$arr_get[27] = isset($_POST[27]) ? $_POST[27] : ‘insured_4_dobDD=’.$dependent2_dob1[1];
$arr_get[28] = isset($_POST[28]) ? $_POST[28] : ‘insured_4_dobYYYY=’.$dependent2_dob1[2];
$arr_get[29] = isset($_POST[29]) ? $_POST[29] : ‘insured_4_gender=’.substr($_GET[‘d2_gen’],0,1);
$arr_get[30] = isset($_POST[30]) ? $_POST[30] : ‘insured_4_smoker=’.$dependent2_smoker;
$arr_get[31] = isset($_POST[31]) ? $_POST[31] : ‘insured_5_dobMM=’.$dependent3_dob1[0];
$arr_get[32] = isset($_POST[32]) ? $_POST[32] : ‘insured_5_dobDD=’.$dependent3_dob1[1];
$arr_get[33] = isset($_POST[33]) ? $_POST[33] : ‘insured_5_dobYYYY=’.$dependent3_dob1[2];
$arr_get[34] = isset($_POST[34]) ? $_POST[34] : ‘insured_5_gender=’.substr($_GET[‘d3_gen’],0,1);
$arr_get[35] = isset($_POST[35]) ? $_POST[35] : ‘insured_5_smoker=’.$dependent3_smoker;
$arr_get[36] = isset($_POST[36]) ? $_POST[36] : ‘insured_6_dobMM=’.$dependent4_dob1[0];
$arr_get[37] = isset($_POST[37]) ? $_POST[37] : ‘insured_6_dobDD=’.$dependent4_dob1[1];
$arr_get[38] = isset($_POST[38]) ? $_POST[38] : ‘insured_6_dobYYYY=’.$dependent4_dob1[2];
$arr_get[39] = isset($_POST[39]) ? $_POST[39] : ‘insured_6_gender=’.substr($_GET[‘d4_gen’],0,1);
$arr_get[40] = isset($_POST[40]) ? $_POST[40] : ‘insured_6_smoker=’.$dependent4_smoker;
$arr_get[41] = isset($_POST[41]) ? $_POST[41] : ‘insured_7_dobMM=’.$dependent5_dob1[0];
$arr_get[42] = isset($_POST[42]) ? $_POST[42] : ‘insured_7_dobDD=’.$dependent5_dob1[1];
$arr_get[43] = isset($_POST[43]) ? $_POST[43] : ‘insured_7_dobYYYY=’.$dependent5_dob1[2];
$arr_get[44] = isset($_POST[44]) ? $_POST[44] : ‘insured_7_gender=’.substr($_GET[‘d5_gen’],0,1);
$arr_get[45] = isset($_POST[45]) ? $_POST[45] : ‘insured_7_smoker=’.$dependent5_smoker;

$url_param1 = implode(‘&’,$arr_get);
$return = curl_action(null, $url_param1, false);

?>

Contact

eTNHealthinsurance
111 South Highland St. #117
Memphis, TN 38111
Phone: (877) 224-2052
www.eTNHealthInsurance.com
info@eTNHealthInsurance.com

Tennesse Insurance Plans