pollCopy
public static string pollCopy(string token, string pollID, string NewPollName)
Create a new Poll using existing poll. Return the ID of the newly created Poll.
| Parameters |
| string token | A valid token for your account. To generate a token, use the login method. |
| string pollID | ID of the existing Poll |
| string pollName | Name which you want to give to the newly created Poll |
| Returns |
| string | Returns the ID of the newly created Poll. |
- <?php
- /**
- 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);
-
- $pollLists = $client->pollGetList($token,"", "", 1, 10, "", "");
- $NewPollName="Health Consceience Poll"
- $NewPollId=$client->pollCopy($token,$pollLists[0]['id'],$NewPollName);
- ?>