wiki
Benvenuto
Guest
, sei in:
<root>
Manual
Manuale IT
Tech
•
Login
• Welcome
Guest
, you are in:
<root>
Manual
Manuale IT
Tech
•
Login
ScrewTurn Wiki
Navigazione (Tech)
¶
Pagina Principale
Pagina Principale (root)
Pagina Casuale
Nuova Pagina
Tutte le Pagine
Categorie
Percorsi di Navigazione
Amministrazione
Gestione File
Registrati
Ricerca wiki
»
Navigation (Tech)
¶
Main Page
Main Page (root)
Random Page
Create a new Page
All Pages
Categories
Navigation Paths
Administration
File Management
Create Account
Search the wiki
»
Back
Lead Generation in PHP
Modified on 2012/06/01 12:11
by
Administrator
Categorized as
Uncategorized
Tustena mette a disposizione il WebGate, un tool che genera un a pagina html per il caricamento dei lead direttamente da form. Questa pagina va inserita nel proprio sito, e presenta un form che, compilato e inviato, genererà un lead nel vostro CRM. Il WebGate può essere utilizzato anche per l'utilizzo attraverso PHP, segue un esempio: @@ <?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; ?> @@
Meta Keywords:
Meta Description:
Change Comment: