public static string surveyCreate(string token, SurveyStructure surveyData)
Create a new Survey based on the details provided. Return the ID of the newly created Survey.
|string token||A valid token for your account. To generate a token, use the login method.|
|array surveyData||The array containing the survey details. |
|string name||This name is NOT displayed in your survey.It is for your reference only.|
|string title||This title appears at the top of your survey when you send it out or post it on your website.|
|string url||This is the page guests will be sent to when they finish the survey. (Example: http://www.yoursite.com/thanks.html). |
|string intro||This message appears beneath the title of the survey.|
|integer logourl||Image Url which is to be used as the Logo of the page.|
|string questions||optional. The number of questions in the survey|
|string status||optional. Status of the survey either wants to keep it online or offline|
|string||Returns the ID of the newly created Survey.|
- This Example shows how to authenticate a user using XML-RPC.
- Note that we are using the PEAR XML-RPC client and recommend others do as well.
- require_once 'XML/RPC2/Client.php';
- require_once 'inc/config.php';
- $client = XML_RPC2_Client::create($apiURL);
- $token = $client->login($apiLogin, $apiPassword);
- $surveyDetail['name'] = 'Sales Survey';
- $surveyDetail['url'] = 'www.benchmarkemail.com';
- $surveyDetail['title'] = 'Shop Survey';
- $surveyDetail['intro'] = 'Please take our quick, easy survey on the services we provide.';
- $newSurveyID = $client->surveyCreate($token, $surveyDetail);