<?php define('TUSTENACOMPANYCODE', '2089C683-FEC9-4E2E-A3EF-7D6E6E94747615013'); define('THANKSPAGE', 'http://www.yoursite.com/thanks.htm'); define('LEADSOURCE', 'WebGate'); if($_SERVER['REQUEST_METHOD']==='POST') { // REQUIRE POST OR DIE if(isset($_POST['CompanyName'])) urlencode($CompanyName = $_POST['CompanyName']); if(isset($_POST['Title'])) urlencode($Title = $_POST['Title']); if(isset($_POST['Name'])) urlencode($Name = $_POST['Name']); if(isset($_POST['Surname'])) urlencode($Surname = $_POST['Surname']); if(isset($_POST['Address'])) urlencode($Address = $_POST['Address']); if(isset($_POST['City'])) urlencode($City = $_POST['City']); if(isset($_POST['Province'])) urlencode($Province = $_POST['Province']); if(isset($_POST['ZIPCode'])) urlencode($ZIPCode = $_POST['ZIPCode']); if(isset($_POST['VAT'])) $VAT = urlencode($_POST['VAT']); if(isset($_POST['Email'])) urlencode($Email = $_POST['Email']); if(isset($_POST['Phone'])) urlencode($Phone = $_POST['Phone']); if(isset($_POST['Fax'])) $Fax = urlencode($_POST['Fax']); if(isset($_POST['MobilePhone'])) urlencode($MobilePhone = $_POST['MobilePhone']); if(isset($_POST['Notes'])) $Notes= htmlentities($_POST['Notes']); $Curl_Session = curl_init('http://crm.tustena.com/webgate/savelead.aspx'); curl_setopt ($Curl_Session, CURLOPT_POST, 1); curl_setopt ($Curl_Session, CURLOPT_POSTFIELDS, "Tustena_CompanyCode=$TUSTENACOMPANYCODE&Tustena_thankspage=$THANKSPAGE&Tustena_leadsource=$LEADSOURCE&Tustena_CompanyName=$CompanyName&Tustena_Title=$Title&Tustena_Name=$Name&Tustena_Surname=$Surname&Tustena_Address=$Address&Tustena_City=$City&Tustena_Province=$Province&Tustena_ZIPCode=$ZIPCode&Tustena_VAT=$VAT&Tustena_Email=$Email&Tustena_Phone=$Phone&Tustena_Fax=$Fax&Tustena_MobilePhone=$MobilePhone&Tustena_Notes=$Notes"); // enable this to force redirect to ThanksPage //curl_setopt ($Curl_Session, CURLOPT_FOLLOWLOCATION, 1); curl_exec ($Curl_Session); curl_close ($Curl_Session); }else die('Hacking attempt Logged!'); exit; ?>