Congratulations: you've successfully established a connection to Infusionsoft.
+
+
Error: Please try again or contact Infusionsoft support.
+
+
+
+ Infusionsoft Google Analytics Settings";
+ // This shows the page's name and an icon if one has been provided ?>
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/infusionsoft.pem b/infusionsoft.pem
new file mode 100644
index 0000000..7a36225
--- /dev/null
+++ b/infusionsoft.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
+UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
+dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
+MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
+dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
+BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
+cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
+AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
+MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
+ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
+IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
+MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
+A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
+7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
+1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
+-----END CERTIFICATE-----
\ No newline at end of file
diff --git a/isdk.php b/isdk.php
new file mode 100644
index 0000000..e1b6e78
--- /dev/null
+++ b/isdk.php
@@ -0,0 +1,2632 @@
+debug = (($key == 'on' || $key == 'off' || $key == 'kill' || $key == 'throw') ? $key : $dbOn);
+
+ if ($key != "" && $key != "on" && $key != "off" && $key != 'kill' && $key != 'throw') {
+ $this->key = $key;
+ } else {
+ include('conn.cfg.php');
+ $appLines = $connInfo;
+ foreach ($appLines as $appLine) {
+ $details[substr($appLine, 0, strpos($appLine, ":"))] = explode(":", $appLine);
+ }
+ $appname = $details[$name][1];
+ $type = $details[$name][2];
+ $this->key = $details[$name][3];
+ }
+
+ switch ($type) {
+ case 'm':
+ $this->client = new xmlrpc_client("https://$appname.mortgageprocrm.com/api/xmlrpc");
+ break;
+ case 'i':
+ default:
+ if (!isset($appname)) {
+ $appname = $name;
+ }
+ $this->client = new xmlrpc_client("https://$appname.infusionsoft.com/api/xmlrpc");
+ break;
+ }
+
+ /* Return Raw PHP Types */
+ $this->client->return_type = "phpvals";
+
+ /* SSL Certificate Verification */
+ $this->client->setSSLVerifyPeer(TRUE);
+ $this->client->setCaCertificate((__DIR__ != '__DIR__' ? __DIR__ : dirname(__FILE__)) . '/infusionsoft.pem');
+ //$this->client->setDebug(2);
+
+ $this->encKey = php_xmlrpc_encode($this->key);
+
+ /* Connection verification */
+ try {
+ $connected = $this->dsGetSetting("Application", "enabled");
+ } catch (iSDKException $e) {
+ throw new iSDKException("Connection Failed");
+ }
+ return true;
+ }
+
+ /**
+ * @method getTemporaryKey
+ * @description Connect and Obtain an API key from a vendor key
+ * @param string $name - Application Name
+ * @param string $user - Username
+ * @param string $pass - Password
+ * @param string $key - Vendor Key
+ * @param string $dbOn - Error Handling On
+ * @param string $type - Infusionsoft or Mortgage Pro
+ * @return bool
+ * @throws iSDKException
+ */
+ public function vendorCon($name, $user, $pass, $key = "", $dbOn = "on", $type = "i")
+ {
+ $this->debug = (($key == 'on' || $key == 'off' || $key == 'kill' || $key == 'throw') ? $key : $dbOn);
+
+ if ($key != "" && $key != "on" && $key != "off" && $key != 'kill' && $key != 'throw') {
+ if ($type == "i") {
+ $this->client = new xmlrpc_client("https://$name.infusionsoft.com/api/xmlrpc");
+ } else if ($type == "m") {
+ $this->client = new xmlrpc_client("https://$name.mortgageprocrm.com/api/xmlrpc");
+ } else {
+ throw new iSDKException ("Invalid application type: \"$name\"");
+ }
+ $this->key = $key;
+ } else {
+ include('conn.cfg.php');
+ $appLines = $connInfo;
+ foreach ($appLines as $appLine) {
+ $details[substr($appLine, 0, strpos($appLine, ":"))] = explode(":", $appLine);
+ }
+ if (!empty($details[$name])) {
+ if ($details[$name][2] == "i") {
+ $this->client = new xmlrpc_client("https://" . $details[$name][1] .
+ ".infusionsoft.com/api/xmlrpc");
+ } elseif ($details[$name][2] == "m") {
+ $this->client = new xmlrpc_client("https://" . $details[$name][1] .
+ ".mortgageprocrm.com/api/xmlrpc");
+ } else {
+ throw new iSDKException("Invalid application name: \"" . $name . "\"");
+ }
+ } else {
+ throw new iSDKException("Application Does Not Exist: \"" . $name . "\"");
+ }
+ $this->key = $details[$name][3];
+ }
+
+ /* Return Raw PHP Types */
+ $this->client->return_type = "phpvals";
+
+ /* SSL Certificate Verification */
+ $this->client->setSSLVerifyPeer(TRUE);
+ $this->client->setCaCertificate((__DIR__ != '__DIR__' ? __DIR__ : dirname(__FILE__)) . '/infusionsoft.pem');
+
+ $carray = array(
+ php_xmlrpc_encode($this->key),
+ php_xmlrpc_encode($user),
+ php_xmlrpc_encode(md5($pass)));
+
+ $this->key = $this->methodCaller("DataService.getTemporaryKey", $carray);
+
+ $this->encKey = php_xmlrpc_encode($this->key);
+
+ try {
+ $connected = $this->dsGetSetting("Application", "enabled");
+ } catch (iSDKException $e) {
+ throw new iSDKException("Connection Failed");
+ }
+ return TRUE;
+ }
+
+ /**
+ * @method echo
+ * @description Worthless public function, used to validate a connection
+ * @param string $txt
+ * @return int|mixed|string
+ */
+ public function appEcho($txt)
+ {
+ $carray = array(
+ php_xmlrpc_encode($txt));
+
+ return $this->methodCaller("DataService.echo", $carray);
+ }
+
+ /**
+ * @method Method Caller
+ * @description Builds XML and Sends the Call
+ * @param string $service
+ * @param array $callArray
+ * @return int|mixed|string
+ * @throws iSDKException
+ */
+ public function methodCaller($service, $callArray)
+ {
+
+ /* Set up the call */
+ $call = new xmlrpcmsg($service, $callArray);
+
+ if ($service != 'DataService.getTemporaryKey') {
+ array_unshift($call->params, $this->encKey);
+ }
+
+ /* Send the call */
+ $now = time();
+ $start = microtime();
+ $result = $this->client->send($call);
+
+ $stop = microtime();
+ /* Check the returned value to see if it was successful and return it */
+ if (!$result->faultCode()) {
+ if ($this->loggingEnabled == 1) {
+ $this->log(array('Method' => $service, 'Call' => $callArray, 'Start' => $start, 'Stop' => $stop, 'Now' => $now, 'Result' => $result, 'Error' => 'No', 'ErrorCode' => 'No Error Code Received'));
+ }
+ return $result->value();
+ } else {
+ if ($this->loggingEnabled == 1) {
+ $this->log(array('Method' => $service, 'Call' => $callArray, 'Start' => $start, 'Stop' => $stop, 'Now' => $now, 'Result' => $result, 'Error' => 'Yes', 'ErrorCode' => "ERROR: " . $result->faultCode() . " - " . $result->faultString()));
+ }
+ if ($this->debug == "kill") {
+ die("ERROR: " . $result->faultCode() . " - " .
+ $result->faultString());
+ } elseif ($this->debug == "on") {
+ return "ERROR: " . $result->faultCode() . " - " .
+ $result->faultString();
+ } elseif ($this->debug == "throw") {
+ throw new iSDKException($result->faultString(), $result->faultCode());
+ } elseif ($this->debug == "off") {
+ //ignore!
+ }
+ }
+
+ }
+
+ /**
+ * @service Affiliate Program Service
+ */
+
+ /**
+ * @method getAffiliatesByProgram
+ * @description Gets a list of all of the affiliates with their contact data for the specified program. This includes all of the custom fields defined for the contact and affiliate records that are retrieved.
+ * @param int $programId
+ * @return array
+ */
+ public function getAffiliatesByProgram($programId)
+ {
+ $carray = array(
+ php_xmlrpc_encode((int)$programId));
+ return $this->methodCaller("AffiliateProgramService.getAffiliatesByProgram", $carray);
+ }
+
+ /**
+ * @method getProgramsForAffiliate
+ * @description Gets a list of all of the Affiliate Programs for the Affiliate specified.
+ * @param int $affiliateId
+ * @return array
+ */
+ public function getProgramsForAffiliate($affiliateId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$affiliateId));
+ return $this->methodCaller("AffiliateProgramService.getProgramsForAffiliate", $carray);
+ }
+
+ /**
+ * @method getAffiliatePrograms
+ * @description Gets a list of all of the Affiliate Programs that are in the application.
+ * @return int|mixed|string
+ */
+ public function getAffiliatePrograms()
+ {
+ $carray = array();
+ return $this->methodCaller("AffiliateProgramService.getAffiliatePrograms", $carray);
+ }
+
+ /**
+ * @method getResourcesForAffiliateProgram
+ * @description Gets a list of all of the resources that are associated to the Affiliate Program specified.
+ * @param int $programId
+ * @return array
+ */
+ public function getResourcesForAffiliateProgram($programId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$programId));
+ return $this->methodCaller("AffiliateProgramService.getResourcesForAffiliateProgram", $carray);
+ }
+
+ /**
+ * @service Affiliate Service
+ */
+
+ /**
+ * @method affClawbacks
+ * @description returns all clawbacks in a date range
+ * @param int $affId
+ * @param date $startDate
+ * @param date $endDate
+ * @return array
+ */
+ public function affClawbacks($affId, $startDate, $endDate)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$affId),
+ php_xmlrpc_encode($startDate, array('auto_dates')),
+ php_xmlrpc_encode($endDate, array('auto_dates')));
+ return $this->methodCaller("APIAffiliateService.affClawbacks", $carray);
+ }
+
+ /**
+ * @method affCommissions
+ * @description returns all commissions in a date range
+ * @param int $affId
+ * @param date $startDate
+ * @param date $endDate
+ * @return array
+ */
+ public function affCommissions($affId, $startDate, $endDate)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$affId),
+ php_xmlrpc_encode($startDate, array('auto_dates')),
+ php_xmlrpc_encode($endDate, array('auto_dates')));
+ return $this->methodCaller("APIAffiliateService.affCommissions", $carray);
+ }
+
+ /**
+ * @method affPayouts
+ * @description returns all affiliate payouts in a date range
+ * @param int $affId
+ * @param date $startDate
+ * @param date $endDate
+ * @return array
+ */
+ public function affPayouts($affId, $startDate, $endDate)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$affId),
+ php_xmlrpc_encode($startDate, array('auto_dates')),
+ php_xmlrpc_encode($endDate, array('auto_dates')));
+ return $this->methodCaller("APIAffiliateService.affPayouts", $carray);
+ }
+
+ /**
+ * @method affRunningTotals
+ * @description Returns a list with each row representing a single affiliates totals represented by a map with key (one of the names above, and value being the total for that variable)
+ * @param array $affList
+ * @return array
+ */
+ public function affRunningTotals($affList)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($affList));
+ return $this->methodCaller("APIAffiliateService.affRunningTotals", $carray);
+ }
+
+ /**
+ * @method affSummary
+ * @description returns how much the specified affiliates are owed
+ * @param array $affList
+ * @param date $startDate
+ * @param date $endDate
+ * @return array
+ */
+ public function affSummary($affList, $startDate, $endDate)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($affList),
+ php_xmlrpc_encode($startDate, array('auto_dates')),
+ php_xmlrpc_encode($endDate, array('auto_dates')));
+ return $this->methodCaller("APIAffiliateService.affSummary", $carray);
+ }
+
+ /**
+ * @method getRedirectLinksForAffiliate
+ * @description returns redirect links for affiliate specified
+ * @param $affiliateId
+ * @return int|mixed|string
+ */
+ public function getRedirectLinksForAffiliate($affiliateId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$affiliateId));
+ return $this->methodCaller("AffiliateService.getRedirectLinksForAffiliate", $carray);
+ }
+
+ /**
+ * @service Contact Service
+ */
+
+ /**
+ * @method add
+ * @description add Contact to Infusionsoft (no duplicate checking)
+ * @param array $cMap
+ * @param string $optReason
+ * @return int
+ */
+ public function addCon($cMap, $optReason = "")
+ {
+
+ $carray = array(
+
+ php_xmlrpc_encode($cMap, array('auto_dates')));
+ $conID = $this->methodCaller("ContactService.add", $carray);
+ if (!empty($cMap['Email'])) {
+ if ($optReason == "") {
+ $this->optIn($cMap['Email']);
+ } else {
+ $this->optIn($cMap['Email'], $optReason);
+ }
+ }
+ return $conID;
+ }
+
+ /**
+ * @method update
+ * @description Update an existing contact
+ * @param int $cid
+ * @param array $cMap
+ * @return int
+ */
+ public function updateCon($cid, $cMap)
+ {
+
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode($cMap, array('auto_dates')));
+ return $this->methodCaller("ContactService.update", $carray);
+ }
+
+ /**
+ * @method merge
+ * @description Merge 2 contacts
+ * @param int $cid
+ * @param int $dcid
+ * @return int
+ */
+ public function mergeCon($cid, $dcid)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($cid),
+ php_xmlrpc_encode($dcid));
+
+ return $this->methodCaller("ContactService.merge", $carray);
+ }
+
+ /**
+ * @method findbyEmail
+ * @description finds all contact with an email address
+ * @param string $eml
+ * @param array $fMap
+ * @return array
+ */
+ public function findByEmail($eml, $fMap)
+ {
+
+ $carray = array(
+
+ php_xmlrpc_encode($eml),
+ php_xmlrpc_encode($fMap));
+ return $this->methodCaller("ContactService.findByEmail", $carray);
+ }
+
+ /**
+ * @method load
+ * @description Loads a contacts data
+ * @param int $cid
+ * @param array $rFields
+ * @return array
+ */
+ public function loadCon($cid, $rFields)
+ {
+
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode($rFields));
+ return $this->methodCaller("ContactService.load", $carray);
+ }
+
+ /**
+ * @method addToGroup
+ * @description Apply a Tag to a Contact
+ * @param int $cid
+ * @param int $gid
+ * @return bool
+ */
+ public function grpAssign($cid, $gid)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode((int)$gid));
+ return $this->methodCaller("ContactService.addToGroup", $carray);
+ }
+
+ /**
+ * @method removeFromGroup
+ * @description Remove a Tag from a Contact
+ * @param int $cid
+ * @param int $gid
+ * @return bool
+ */
+ public function grpRemove($cid, $gid)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode((int)$gid));
+ return $this->methodCaller("ContactService.removeFromGroup", $carray);
+ }
+
+ /**
+ * @method resumeCampaignForContact
+ * @description resumes a legacy followup sequence a contact is in
+ * @param int $cid
+ * @param int $sequenceId
+ * @return bool
+ */
+ public function resumeCampaignForContact($cid, $sequenceId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode((int)$sequenceId));
+ return $this->methodCaller("ContactService.resumeCampaignForContact", $carray);
+ }
+
+ /**
+ * @method addToCampaign
+ * @description adds a contact to a legacy followup sequence
+ * @param int $cid
+ * @param int $campId
+ * @return bool
+ */
+ public function campAssign($cid, $campId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode((int)$campId));
+ return $this->methodCaller("ContactService.addToCampaign", $carray);
+ }
+
+ /**
+ * @method getNextCampaignStep
+ * @description gets next step in a legacy followup sequence
+ * @param int $cid
+ * @param int $campId
+ * @return array
+ */
+ public function getNextCampaignStep($cid, $campId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode((int)$campId));
+ return
+ $this->methodCaller("ContactService.getNextCampaignStep", $carray);
+ }
+
+ /**
+ * @method getCampaigneeStepDetails
+ * @description get step details for a legacy followup sequence
+ * @param int $cid
+ * @param int $stepId
+ * @return array
+ */
+ public function getCampaigneeStepDetails($cid, $stepId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode((int)$stepId));
+ return
+ $this->methodCaller("ContactService.getCampaigneeStepDetails", $carray);
+ }
+
+ /**
+ * @method rescheduleCampaignStep
+ * @description reschedule a legacy followup sequence
+ * @param array $cidList
+ * @param int $campId
+ * @return int
+ */
+ public function rescheduleCampaignStep($cidList, $campId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($cidList),
+ php_xmlrpc_encode((int)$campId));
+ return
+ $this->methodCaller("ContactService.rescheduleCampaignStep", $carray);
+ }
+
+ /**
+ * @method removeFromCampaign
+ * @description remove a contact from a legacy followup sequence
+ * @param int $cid
+ * @param int $campId
+ * @return bool
+ */
+ public function campRemove($cid, $campId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode((int)$campId));
+ return $this->methodCaller("ContactService.removeFromCampaign", $carray);
+ }
+
+ /**
+ * @method pauseCampaign
+ * @description pause a legacy followup sequence for a contact
+ * @param int $cid
+ * @param int $campId
+ * @return bool
+ */
+ public function campPause($cid, $campId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode((int)$campId));
+ return $this->methodCaller("ContactService.pauseCampaign", $carray);
+ }
+
+ /**
+ * @method runActionSequence
+ * @description run an actionset on a contact
+ * @param int $cid
+ * @param int $aid
+ * @return array
+ */
+ public function runAS($cid, $aid)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode((int)$aid));
+ return $this->methodCaller("ContactService.runActionSequence", $carray);
+ }
+
+ /**
+ * @method applyActivityHistoryTemplate
+ * @description add a note, task, or appointment to a contact from a template
+ * @param int $contactId
+ * @param int $historyId
+ * @param int $userId
+ * @return int|mixed|string
+ */
+ public function applyActivityHistoryTemplate($contactId, $historyId, $userId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$contactId),
+ php_xmlrpc_encode((int)$historyId),
+ php_xmlrpc_encode((int)$userId));
+ return $this->methodCaller("ContactService.applyActivityHistoryTemplate", $carray);
+ }
+
+ /**
+ * @method getActivityHistoryTemplateMap
+ * @description get templates for use with applyActivityHistoryTemplate
+ * @return array
+ */
+ public function getActivityHistoryTemplateMap()
+ {
+ $carray = array();
+ return $this->methodCaller("ContactService.getActivityHistoryTemplateMap", $carray);
+ }
+
+ /**
+ * @method addWithDupCheck
+ * @description add a contact with duplicate checking
+ * @param array $cMap
+ * @param string $checkType - 'Email', 'EmailAndName', or 'EmailAndNameAnd Company'
+ * @return int
+ */
+ public function addWithDupCheck($cMap, $checkType)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($cMap, array('auto_dates')),
+ php_xmlrpc_encode($checkType));
+ return $this->methodCaller("ContactService.addWithDupCheck", $carray);
+ }
+
+ /**
+ * @service Credit Card Submission Service
+ */
+
+ /**
+ * @method requestSubmissionToken
+ * @description gets a token, which is needed to POST a credit card to the application
+ * @param int $contactId
+ * @param string $successUrl
+ * @param string $failureUrl
+ * @return string
+ */
+ public function requestCcSubmissionToken($contactId, $successUrl, $failureUrl)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$contactId),
+ php_xmlrpc_encode((string)$successUrl),
+ php_xmlrpc_encode((string)$failureUrl));
+ return $this->methodCaller("CreditCardSubmissionService.requestSubmissionToken", $carray);
+ }
+
+ /**
+ * @method requestCreditCardId
+ * @description retrieves credit card details (CC number not included) that have been posted to the app
+ * @param $token
+ * @return array
+ */
+ public function requestCreditCardId($token)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($token));
+ return $this->methodCaller("CreditCardSubmissionService.requestCreditCardId", $carray);
+ }
+
+ /**
+ * @service Data Service
+ */
+
+ /**
+ * @method getAppSetting
+ * @description gets an app setting
+ * @param string $module
+ * @param string $setting
+ * @return int|mixed|string
+ */
+ public function dsGetSetting($module, $setting)
+ {
+ $carray = array(
+ php_xmlrpc_encode($module),
+ php_xmlrpc_encode($setting));
+ return $this->methodCaller("DataService.getAppSetting", $carray);
+ }
+
+ /**
+ * @method add
+ * @description Add a record to a table
+ * @param string $tName
+ * @param array $iMap
+ * @return int
+ */
+ public function dsAdd($tName, $iMap)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($tName),
+ php_xmlrpc_encode($iMap, array('auto_dates')));
+
+ return $this->methodCaller("DataService.add", $carray);
+ }
+
+ /**
+ * @method dsAddWithImage
+ * @description Add a record to a table that includes an image
+ * @param string $tName
+ * @param array $iMap
+ * @return int
+ */
+ public function dsAddWithImage($tName, $iMap)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($tName),
+ php_xmlrpc_encode($iMap, array('auto_dates', 'auto_base64')));
+
+ return $this->methodCaller("DataService.add", $carray);
+ }
+
+ /**
+ * @method delete
+ * @description delete a record from Infusionsoft
+ * @param string $tName
+ * @param int $id
+ * @return bool
+ */
+ public function dsDelete($tName, $id)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($tName),
+ php_xmlrpc_encode((int)$id));
+
+ return $this->methodCaller("DataService.delete", $carray);
+ }
+
+ /**
+ * @method update
+ * @description Update a record in any table
+ * @param string $tName
+ * @param int $id
+ * @param array $iMap
+ * @return int
+ */
+ public function dsUpdate($tName, $id, $iMap)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($tName),
+ php_xmlrpc_encode((int)$id),
+ php_xmlrpc_encode($iMap, array('auto_dates')));
+
+ return $this->methodCaller("DataService.update", $carray);
+ }
+
+ /**
+ * @method dsUpdateWithImage
+ * @description Update a record in any table with an image
+ * @param string $tName
+ * @param int $id
+ * @param array $iMap
+ * @return int
+ */
+ public function dsUpdateWithImage($tName, $id, $iMap)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($tName),
+ php_xmlrpc_encode((int)$id),
+ php_xmlrpc_encode($iMap, array('auto_dates', 'auto_base64')));
+
+ return $this->methodCaller("DataService.update", $carray);
+ }
+
+ /**
+ * @method load
+ * @description Load a record from any table
+ * @param string $tName
+ * @param int $id
+ * @param array $rFields
+ * @return array
+ */
+ public function dsLoad($tName, $id, $rFields)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($tName),
+ php_xmlrpc_encode((int)$id),
+ php_xmlrpc_encode($rFields));
+
+ return $this->methodCaller("DataService.load", $carray);
+ }
+
+ /**
+ * @method findByField
+ * @description finds records by searching a specific field
+ * @param string $tName
+ * @param int $limit
+ * @param int $page
+ * @param string $field
+ * @param string $value
+ * @param array $rFields
+ * @return array
+ */
+ public function dsFind($tName, $limit, $page, $field, $value, $rFields)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($tName),
+ php_xmlrpc_encode((int)$limit),
+ php_xmlrpc_encode((int)$page),
+ php_xmlrpc_encode($field),
+ php_xmlrpc_encode($value),
+ php_xmlrpc_encode($rFields));
+
+ return $this->methodCaller("DataService.findByField", $carray);
+ }
+
+ /**
+ * @method query
+ * @description Finds records based on query
+ * @param string $tName
+ * @param int $limit
+ * @param int $page
+ * @param array $query
+ * @param array $rFields
+ * @return array
+ */
+ public function dsQuery($tName, $limit, $page, $query, $rFields)
+ {
+ $carray = array(
+ php_xmlrpc_encode($tName),
+ php_xmlrpc_encode((int)$limit),
+ php_xmlrpc_encode((int)$page),
+ php_xmlrpc_encode($query, array('auto_dates')),
+ php_xmlrpc_encode($rFields));
+
+ return $this->methodCaller("DataService.query", $carray);
+ }
+
+ /**
+ * @method queryWithOrderBy
+ * @description Finds records based on query with option to sort
+ * @param string $tName
+ * @param int $limit
+ * @param int $page
+ * @param array $query
+ * @param array $rFields
+ * @param string $orderByField
+ * @param bool $ascending
+ * @return array
+ */
+ public function dsQueryOrderBy($tName, $limit, $page, $query, $rFields, $orderByField, $ascending = TRUE)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($tName),
+ php_xmlrpc_encode((int)$limit),
+ php_xmlrpc_encode((int)$page),
+ php_xmlrpc_encode($query, array('auto_dates')),
+ php_xmlrpc_encode($rFields),
+ php_xmlrpc_encode($orderByField),
+ php_xmlrpc_encode((bool)$ascending));
+
+ return $this->methodCaller("DataService.query", $carray);
+ }
+
+ /**
+ * @method addCustomField
+ * @description adds a custom field
+ * @param string $context
+ * @param string $displayName
+ * @param int $dataType
+ * @param int $headerID
+ * @return int
+ */
+ public function addCustomField($context, $displayName, $dataType, $headerID)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($context),
+ php_xmlrpc_encode($displayName),
+ php_xmlrpc_encode($dataType),
+ php_xmlrpc_encode((int)$headerID));
+
+ return $this->methodCaller("DataService.addCustomField", $carray);
+ }
+
+ /**
+ * @method authenticateUser
+ * @description Authenticates a user account in Infusionsoft
+ * @param string $userName
+ * @param string $password
+ * @return int
+ */
+ public function authenticateUser($userName, $password)
+ {
+ $password = strtolower(md5($password));
+ $carray = array(
+
+ php_xmlrpc_encode($userName),
+ php_xmlrpc_encode($password));
+
+ return $this->methodCaller("DataService.authenticateUser", $carray);
+ }
+
+ /**
+ * @method - updateCustomField
+ * @description update a custom field
+ * @param int $fieldId
+ * @param array $fieldValues
+ * @return int
+ */
+ public function updateCustomField($fieldId, $fieldValues)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$fieldId),
+ php_xmlrpc_encode($fieldValues));
+ return $this->methodCaller("DataService.updateCustomField", $carray);
+ }
+
+ /**
+ * @service Discount Service
+ */
+
+ /**
+ * @method addFreeTrial
+ * @description creates a subscription free trial for the shopping cart
+ * @param string $name
+ * @param string $description
+ * @param int $freeTrialDays
+ * @param int $hidePrice
+ * @param int $subscriptionPlanId
+ * @return int
+ */
+ public function addFreeTrial($name, $description, $freeTrialDays, $hidePrice, $subscriptionPlanId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((string)$name),
+ php_xmlrpc_encode((string)$description),
+ php_xmlrpc_encode((int)$freeTrialDays),
+ php_xmlrpc_encode((int)$hidePrice),
+ php_xmlrpc_encode((int)$subscriptionPlanId));
+ return $this->methodCaller("DiscountService.addFreeTrial", $carray);
+ }
+
+ /**
+ * @method getFreeTrial
+ * @description retrieves the details on the given free trial
+ * @param int $trialId
+ * @return array
+ */
+ public function getFreeTrial($trialId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$trialId));
+ return $this->methodCaller("DiscountService.getFreeTrial", $carray);
+ }
+
+ /**
+ * @method addOrderTotalDiscount
+ * @description creates an order total discount for the shopping cart
+ * @param string $name
+ * @param string $description
+ * @param int $applyDiscountToCommission
+ * @param int $percentOrAmt
+ * @paramOption 0 Amount
+ * @paramOption 1 Percent
+ * @param double $amt
+ * @param string $payType
+ * @paramOption Gross
+ * @paramOption Net
+ * @return int
+ */
+ public function addOrderTotalDiscount($name, $description, $applyDiscountToCommission, $percentOrAmt, $amt, $payType)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((string)$name),
+ php_xmlrpc_encode((string)$description),
+ php_xmlrpc_encode((int)$applyDiscountToCommission),
+ php_xmlrpc_encode((int)$percentOrAmt),
+ php_xmlrpc_encode($amt),
+ php_xmlrpc_encode($payType));
+ return $this->methodCaller("DiscountService.addOrderTotalDiscount", $carray);
+ }
+
+ /**
+ * @method getOrderTotalDiscount
+ * @description retrieves the details on the given order total discount
+ * @param int $id
+ * @return array
+ */
+ public function getOrderTotalDiscount($id)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$id));
+ return $this->methodCaller("DiscountService.getOrderTotalDiscount", $carray);
+ }
+
+ /**
+ * @method addCategoryDiscount
+ * @description creates a product category discount for the shopping cart
+ * @param string $name
+ * @param string $description
+ * @param int $applyDiscountToCommission
+ * @param double $amt
+ * @return int
+ */
+ public function addCategoryDiscount($name, $description, $applyDiscountToCommission, $amt)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((string)$name),
+ php_xmlrpc_encode((string)$description),
+ php_xmlrpc_encode((int)$applyDiscountToCommission),
+ php_xmlrpc_encode($amt));
+ return $this->methodCaller("DiscountService.addCategoryDiscount", $carray);
+ }
+
+ /**
+ * @method getCategoryDiscount
+ * @description retrieves the details on the Category discount
+ * @param int $id
+ * @return array
+ */
+ public function getCategoryDiscount($id)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$id));
+ return $this->methodCaller("DiscountService.getCategoryDiscount", $carray);
+ }
+
+ /**
+ * @method addCategoryAssignmentToCategoryDiscount
+ * @description assigns a product category to a particular category discount
+ * @param int $categoryDiscountId
+ * @param int $productCategoryId
+ * @return int
+ */
+ public function addCategoryAssignmentToCategoryDiscount($categoryDiscountId, $productCategoryId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$categoryDiscountId),
+ php_xmlrpc_encode((int)$productCategoryId));
+ return $this->methodCaller("DiscountService.addCategoryAssignmentToCategoryDiscount", $carray);
+ }
+
+ /**
+ * @method getCategoryAssignmentsForCategoryDiscount
+ * @description retrieves the product categories that are currently set for the given category discount
+ * @param int $id
+ * @return array
+ */
+ public function getCategoryAssignmentsForCategoryDiscount($id)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$id));
+ return $this->methodCaller("DiscountService.getCategoryAssignmentsForCategoryDiscount", $carray);
+ }
+
+ /**
+ * @method addProductTotalDiscount
+ * @description creates a product total discount for the shopping cart
+ * @param string $name
+ * @param string $description
+ * @param int $applyDiscountToCommission
+ * @param int $productId
+ * @param int $percentOrAmt
+ * @paramOption 0 Amount
+ * @paramOption 1 Percent
+ * @param double $amt
+ * @return int
+ */
+ public function addProductTotalDiscount($name, $description, $applyDiscountToCommission, $productId, $percentOrAmt, $amt)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((string)$name),
+ php_xmlrpc_encode((string)$description),
+ php_xmlrpc_encode((int)$applyDiscountToCommission),
+ php_xmlrpc_encode((int)$productId),
+ php_xmlrpc_encode((int)$percentOrAmt),
+ php_xmlrpc_encode($amt));
+ return $this->methodCaller("DiscountService.addProductTotalDiscount", $carray);
+ }
+
+ /**
+ * @method getProductTotalDiscount
+ * @description retrieves the details on the given product total discount
+ * @param int $id
+ * @return array
+ */
+ public function getProductTotalDiscount($id)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$id));
+ return $this->methodCaller("DiscountService.getProductTotalDiscount", $carray);
+ }
+
+ /**
+ * @method addShippingTotalDiscount
+ * @description creates a shipping total discount for the shopping cart
+ * @param string $name
+ * @param string $description
+ * @param int $applyDiscountToCommission
+ * @param int $percentOrAmt
+ * @paramOption 0 Amount
+ * @paramOption 1 Percent
+ * @param double $amt
+ * @return int
+ */
+ public function addShippingTotalDiscount($name, $description, $applyDiscountToCommission, $percentOrAmt, $amt)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((string)$name),
+ php_xmlrpc_encode((string)$description),
+ php_xmlrpc_encode((int)$applyDiscountToCommission),
+ php_xmlrpc_encode((int)$percentOrAmt),
+ php_xmlrpc_encode($amt));
+ return $this->methodCaller("DiscountService.addShippingTotalDiscount", $carray);
+ }
+
+ /**
+ * @method getShippingTotalDiscount
+ * @description retrieves the details on the given shipping total discount
+ * @param int $id
+ * @return array
+ */
+ public function getShippingTotalDiscount($id)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$id));
+ return $this->methodCaller("DiscountService.getShippingTotalDiscount", $carray);
+ }
+
+ /**
+ * @service API Email Service
+ */
+
+ /**
+ * @method attachEmail
+ * @description attachs an email to a contacts email history
+ * @param int $cId
+ * @param string $fromName
+ * @param string $fromAddress
+ * @param string $toAddress
+ * @param string $ccAddresses
+ * @param string $bccAddresses
+ * @param string $contentType
+ * @param string $subject
+ * @param string $htmlBody
+ * @param string $txtBody
+ * @param string $header
+ * @param date $strRecvdDate
+ * @param date $strSentDate
+ * @param int $emailSentType
+ * @return bool
+ */
+ public function attachEmail($cId, $fromName, $fromAddress, $toAddress, $ccAddresses,
+ $bccAddresses, $contentType, $subject, $htmlBody, $txtBody,
+ $header, $strRecvdDate, $strSentDate, $emailSentType = 1)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cId),
+ php_xmlrpc_encode($fromName),
+ php_xmlrpc_encode($fromAddress),
+ php_xmlrpc_encode($toAddress),
+ php_xmlrpc_encode($ccAddresses),
+ php_xmlrpc_encode($bccAddresses),
+ php_xmlrpc_encode($contentType),
+ php_xmlrpc_encode($subject),
+ php_xmlrpc_encode($htmlBody),
+ php_xmlrpc_encode($txtBody),
+ php_xmlrpc_encode($header),
+ php_xmlrpc_encode($strRecvdDate),
+ php_xmlrpc_encode($strSentDate),
+ php_xmlrpc_encode($emailSentType));
+ return $this->methodCaller("APIEmailService.attachEmail", $carray);
+ }
+
+ /**
+ * @method getAvailableMergeFields
+ * @description gets a list of all available merge fields
+ * @param string $mergeContext
+ * @return array
+ */
+ public function getAvailableMergeFields($mergeContext)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($mergeContext));
+ return $this->methodCaller("APIEmailService.getAvailableMergeFields", $carray);
+ }
+
+ /**
+ * @method sendEmail
+ * @description send an email to a list of contacts
+ * @param array $conList
+ * @param string $fromAddress
+ * @param string $toAddress
+ * @param string $ccAddresses
+ * @param string $bccAddresses
+ * @param string $contentType
+ * @param string $subject
+ * @param string $htmlBody
+ * @param string $txtBody
+ * @return bool
+ */
+ public function sendEmail($conList, $fromAddress, $toAddress, $ccAddresses, $bccAddresses, $contentType, $subject, $htmlBody, $txtBody)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($conList),
+ php_xmlrpc_encode($fromAddress),
+ php_xmlrpc_encode($toAddress),
+ php_xmlrpc_encode($ccAddresses),
+ php_xmlrpc_encode($bccAddresses),
+ php_xmlrpc_encode($contentType),
+ php_xmlrpc_encode($subject),
+ php_xmlrpc_encode($htmlBody),
+ php_xmlrpc_encode($txtBody));
+
+ return $this->methodCaller("APIEmailService.sendEmail", $carray);
+ }
+
+ /**
+ * @method sendTemplate
+ * @description sends a template to a list of contacts
+ * @note uses APIEmailService.sendEmail with different parameters
+ * @param array $conList
+ * @param int $template
+ * @return bool
+ */
+ public function sendTemplate($conList, $template)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($conList),
+ php_xmlrpc_encode($template));
+ return $this->methodCaller("APIEmailService.sendEmail", $carray);
+ }
+
+ /**
+ * @note THIS IS DEPRECATED - USE addEmailTemplate instead!
+ * @method createEmailTemplate
+ * @description Creates a legacy Email Template
+ * @param string $title
+ * @param int $userID
+ * @param string $fromAddress
+ * @param string $toAddress
+ * @param string $ccAddresses
+ * @param string $bccAddresses
+ * @param string $contentType
+ * @param string $subject
+ * @param string $htmlBody
+ * @param string $txtBody
+ * @return int
+ */
+ public function createEmailTemplate($title, $userID, $fromAddress, $toAddress, $ccAddresses, $bccAddresses, $contentType, $subject, $htmlBody,
+ $txtBody)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($title),
+ php_xmlrpc_encode($category = ''),
+ php_xmlrpc_encode($fromAddress),
+ php_xmlrpc_encode($toAddress),
+ php_xmlrpc_encode($ccAddresses),
+ php_xmlrpc_encode($bccAddresses),
+ php_xmlrpc_encode($subject),
+ php_xmlrpc_encode($txtBody),
+ php_xmlrpc_encode($htmlBody),
+ php_xmlrpc_encode($contentType),
+ php_xmlrpc_encode($mergeContext = 'Contact'));
+ return $this->methodCaller("APIEmailService.addEmailTemplate", $carray);
+ }
+
+ /**
+ * @method addEmailTemplate
+ * @description creates an Email Template
+ * @param string $title
+ * @param string $category
+ * @param string $fromAddress
+ * @param string $toAddress
+ * @param string $ccAddresses
+ * @param string $bccAddresses
+ * @param string $subject
+ * @param string $txtBody
+ * @param string $htmlBody
+ * @param string $contentType
+ * @param string $mergeContext
+ * @return int
+ */
+ public function addEmailTemplate($title, $category, $fromAddress, $toAddress, $ccAddresses, $bccAddresses, $subject, $txtBody, $htmlBody, $contentType, $mergeContext)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($title),
+ php_xmlrpc_encode($category),
+ php_xmlrpc_encode($fromAddress),
+ php_xmlrpc_encode($toAddress),
+ php_xmlrpc_encode($ccAddresses),
+ php_xmlrpc_encode($bccAddresses),
+ php_xmlrpc_encode($subject),
+ php_xmlrpc_encode($txtBody),
+ php_xmlrpc_encode($htmlBody),
+ php_xmlrpc_encode($contentType),
+ php_xmlrpc_encode($mergeContext));
+ return $this->methodCaller("APIEmailService.addEmailTemplate", $carray);
+ }
+
+ /**
+ * @method getEmailTemplate
+ * @description get the HTML of an email template
+ * @param int $templateId
+ * @return array
+ */
+ public function getEmailTemplate($templateId)
+ {
+ $carray = array(
+ php_xmlrpc_encode((int)$templateId));
+ return $this->methodCaller("APIEmailService.getEmailTemplate", $carray);
+ }
+
+ /**
+ * @method updateEmailTemplate
+ * @description Update an Email template
+ * @param int $templateID
+ * @param string $title
+ * @param string $categories
+ * @param string $fromAddress
+ * @param string $toAddress
+ * @param string $ccAddress
+ * @param string $bccAddress
+ * @param string $subject
+ * @param string $textBody
+ * @param string $htmlBody
+ * @param string $contentType
+ * @param string $mergeContext
+ * @return bool
+ */
+ public function updateEmailTemplate($templateID, $title, $categories, $fromAddress, $toAddress, $ccAddress, $bccAddress, $subject, $textBody, $htmlBody, $contentType, $mergeContext)
+ {
+ $carray = array(
+ php_xmlrpc_encode((int)$templateID),
+ php_xmlrpc_encode($title),
+ php_xmlrpc_encode($categories),
+ php_xmlrpc_encode($fromAddress),
+ php_xmlrpc_encode($toAddress),
+ php_xmlrpc_encode($ccAddress),
+ php_xmlrpc_encode($bccAddress),
+ php_xmlrpc_encode($subject),
+ php_xmlrpc_encode($textBody),
+ php_xmlrpc_encode($htmlBody),
+ php_xmlrpc_encode($contentType),
+ php_xmlrpc_encode($mergeContext));
+ return $this->methodCaller("APIEmailService.updateEmailTemplate", $carray);
+ }
+
+ /**
+ * @method getOptStatus
+ * @description get the Opt status of an email
+ * @param string $email
+ * @return int
+ */
+ public function optStatus($email)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($email));
+ return $this->methodCaller("APIEmailService.getOptStatus", $carray);
+ }
+
+ /**
+ * @method optIn
+ * @description Opts an email in to allow emails to be sent to them
+ * @note Opt-In will only work on "non-marketable contacts not opted out people
+ * @param string $email
+ * @param string $reason
+ * @return bool
+ */
+ public function optIn($email, $reason = 'Contact Was Opted In through the API')
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($email),
+ php_xmlrpc_encode($reason));
+ return $this->methodCaller("APIEmailService.optIn", $carray);
+ }
+
+ /**
+ * @method optOut
+ * @description Opts an email out. Emails will not be sent to them anymore
+ * @param string $email
+ * @param string $reason
+ * @return bool
+ */
+ public function optOut($email, $reason = 'Contact Was Opted Out through the API')
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($email),
+ php_xmlrpc_encode($reason));
+ return $this->methodCaller("APIEmailService.optOut", $carray);
+ }
+
+ /**
+ * @service File Service
+ */
+
+ /**
+ * @method getFile
+ * @description Gets File
+ * @param int $fileID
+ * @return base64 encoded file data
+ */
+ public function getFile($fileID)
+ {
+
+ $carray = array(
+
+ php_xmlrpc_encode((int)$fileID));
+ $result = $this->methodCaller("FileService.getFile", $carray);
+ return $result;
+ }
+
+ /**
+ * @method uploadFile
+ * @description Upload a file to Infusionsoft
+ * @param string $fileName
+ * @param string $base64Enc
+ * @param int $cid
+ * @return int|mixed|string
+ */
+ public function uploadFile($fileName, $base64Enc, $cid = 0)
+ {
+ $result = 0;
+ if ($cid == 0) {
+ $carray = array(
+
+ php_xmlrpc_encode($fileName),
+ php_xmlrpc_encode($base64Enc));
+ $result = $this->methodCaller("FileService.uploadFile", $carray);
+ } else {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode($fileName),
+ php_xmlrpc_encode($base64Enc));
+ $result = $this->methodCaller("FileService.uploadFile", $carray);
+ }
+ return $result;
+ }
+
+ /**
+ * @method replaceFile
+ * @description replaces existing file
+ * @param int $fileID
+ * @param string $base64Enc
+ * @return bool
+ */
+ public function replaceFile($fileID, $base64Enc)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$fileID),
+ php_xmlrpc_encode($base64Enc));
+ $result = $this->methodCaller("FileService.replaceFile", $carray);
+ return $result;
+ }
+
+ /**
+ * @method renameFile
+ * @description rename existing file
+ * @param int $fileID
+ * @param string $fileName
+ * @return bool
+ */
+ public function renameFile($fileID, $fileName)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$fileID),
+ php_xmlrpc_encode($fileName));
+ $result = $this->methodCaller("FileService.renameFile", $carray);
+ return $result;
+ }
+
+ /**
+ * @method getDownloadUrl
+ * @description gets download url for public files
+ * @param int $fileID
+ * @return string
+ */
+ public function getDownloadUrl($fileID)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$fileID));
+ $result = $this->methodCaller("FileService.getDownloadUrl", $carray);
+ return $result;
+ }
+
+ /**
+ * @service Funnel Service
+ */
+
+ /**
+ * @method achieveGoal
+ * @description achieves an api goal inside of the Campaign Builder to start a campaign
+ * @param string $integration
+ * @param string $callName
+ * @param int $contactId
+ * @return array
+ */
+ public function achieveGoal($integration, $callName, $contactId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((string)$integration),
+ php_xmlrpc_encode((string)$callName),
+ php_xmlrpc_encode((int)$contactId));
+ return $this->methodCaller("FunnelService.achieveGoal", $carray);
+ }
+
+ /**
+ * @service Invoice Service
+ */
+
+ /**
+ * @method deleteInvoice
+ * @description deletes an invoice
+ * @param int $Id
+ * @return bool
+ */
+ public function deleteInvoice($Id)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$Id));
+ return $this->methodCaller("InvoiceService.deleteInvoice", $carray);
+ }
+
+ /**
+ * @method deleteSubscriptioin
+ * @description Delete a Subscription created through the API
+ * @param $Id
+ * @return bool
+ */
+ public function deleteSubscription($Id)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$Id));
+ return $this->methodCaller("InvoiceService.deleteSubscription", $carray);
+ }
+
+ /**
+ * @method getPayments
+ * @description Get a list of payments on an invoice
+ * @param $Id
+ * @return array
+ */
+ public function getPayments($Id)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$Id));
+ return $this->methodCaller("InvoiceService.getPayments", $carray);
+ }
+
+ /**
+ * @method setInvoiceSyncStatus
+ * @description sets the sync status column on the Invoice table
+ * @param $Id
+ * @param $syncStatus
+ * @return bool
+ */
+ public function setInvoiceSyncStatus($Id, $syncStatus)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$Id),
+ php_xmlrpc_encode($syncStatus));
+ return $this->methodCaller("InvoiceService.setInvoiceSyncStatus", $carray);
+ }
+
+ /**
+ * @method setPaymentSyncStatus
+ * @description sets the sync status column on the Payment table
+ * @param $Id
+ * @param $Status
+ * @return bool
+ */
+ public function setPaymentSyncStatus($Id, $Status)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$Id),
+ php_xmlrpc_encode($Status));
+ return $this->methodCaller("InvoiceService.setPaymentSyncStatus", $carray);
+ }
+
+ /**
+ * @method getPluginStatus
+ * @description Tells if the Ecommerce plugin is enabled
+ * @param string $className
+ * @return bool
+ */
+ public function getPluginStatus($className)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($className));
+ return $this->methodCaller("InvoiceService.getPluginStatus", $carray);
+ }
+
+ /**
+ * @method getAllPaymentOptions
+ * @description get a list of all Payment Options
+ * @return array
+ */
+ public function getAllPaymentOptions()
+ {
+ $carray = array();
+ return $this->methodCaller("InvoiceService.getAllPaymentOptions", $carray);
+ }
+
+ /**
+ * @method addManualPayment
+ * @description add a manual payment to an invoice.
+ * @note Will not complete Purchase Goals or Successful Purchase Actions
+ * @param int $invId
+ * @param double $amt
+ * @param datetime $payDate
+ * @param datetime $payType
+ * @param string $payDesc
+ * @param bool $bypassComm
+ * @return int
+ */
+ public function manualPmt($invId, $amt, $payDate, $payType, $payDesc, $bypassComm)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$invId),
+ php_xmlrpc_encode($amt),
+ php_xmlrpc_encode($payDate, array('auto_dates')),
+ php_xmlrpc_encode($payType),
+ php_xmlrpc_encode($payDesc),
+ php_xmlrpc_encode($bypassComm));
+ return $this->methodCaller("InvoiceService.addManualPayment", $carray);
+ }
+
+ /**
+ * @method addOrderCommissionOverride
+ * @description Override Order Commissions
+ * @param int $invId
+ * @param int $affId
+ * @param int $prodId
+ * @param int $percentage
+ * @param double $amt
+ * @param int $payType
+ * @param string $desc
+ * @param date $date
+ * @return bool
+ */
+ public function commOverride($invId, $affId, $prodId, $percentage, $amt, $payType, $desc, $date)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$invId),
+ php_xmlrpc_encode((int)$affId),
+ php_xmlrpc_encode((int)$prodId),
+ php_xmlrpc_encode($percentage),
+ php_xmlrpc_encode($amt),
+ php_xmlrpc_encode($payType),
+ php_xmlrpc_encode($desc),
+ php_xmlrpc_encode($date, array('auto_dates')));
+
+ return $this->methodCaller("InvoiceService.addOrderCommissionOverride", $carray);
+ }
+
+ /**
+ * @method addOrderItem
+ * @description add a line item to an order
+ * @param int $ordId
+ * @param int $prodId
+ * @param int $type
+ * @paramOption 1 Shipping
+ * @paramOption 2 Tax
+ * @paramOption 3 Service & Misc
+ * @paramOption 4 Product
+ * @paramOption 5 Upsell Product
+ * @paramOption 6 Fiance Charge
+ * @paramOption 7 Special
+ * @paramOption 8 Program
+ * @paramOption 9 Subscription Plan
+ * @paramOption 10 Special:Free Trial Days
+ * @paramOption 12 Special: Order Total
+ * @paramOption 13 Special: Category
+ * @paramOption 14 Special: Shipping
+ * @param double $price
+ * @param itn $qty
+ * @param string $desc
+ * @param string $notes
+ * @return bool
+ */
+ public function addOrderItem($ordId, $prodId, $type, $price, $qty, $desc, $notes)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$ordId),
+ php_xmlrpc_encode((int)$prodId),
+ php_xmlrpc_encode((int)$type),
+ php_xmlrpc_encode($price),
+ php_xmlrpc_encode($qty),
+ php_xmlrpc_encode($desc),
+ php_xmlrpc_encode($notes));
+
+ return $this->methodCaller("InvoiceService.addOrderItem", $carray);
+ }
+
+ /**
+ * @method addPaymentPlan
+ * @description add a payment plan to an order
+ * @param int $ordId
+ * @param bool $aCharge
+ * @param int $ccId
+ * @param int $merchId
+ * @param int $retry
+ * @param int $retryAmt
+ * @param double $initialPmt
+ * @param datetime $initialPmtDate
+ * @param datetime $planStartDate
+ * @param int $numPmts
+ * @param int $pmtDays
+ * @return bool
+ */
+ public function payPlan($ordId, $aCharge, $ccId, $merchId, $retry, $retryAmt, $initialPmt, $initialPmtDate, $planStartDate, $numPmts, $pmtDays)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$ordId),
+ php_xmlrpc_encode($aCharge),
+ php_xmlrpc_encode((int)$ccId),
+ php_xmlrpc_encode((int)$merchId),
+ php_xmlrpc_encode((int)$retry),
+ php_xmlrpc_encode((int)$retryAmt),
+ php_xmlrpc_encode($initialPmt),
+ php_xmlrpc_encode($initialPmtDate, array('auto_dates')),
+ php_xmlrpc_encode($planStartDate, array('auto_dates')),
+ php_xmlrpc_encode((int)$numPmts),
+ php_xmlrpc_encode((int)$pmtDays));
+ return $this->methodCaller("InvoiceService.addPaymentPlan", $carray);
+ }
+
+ /**
+ * @method addRecurringOrder
+ * @description creates a subscription for a contact
+ * @param int $cid
+ * @param bool $allowDup
+ * @param int $progId
+ * @param int $merchId
+ * @param int $ccId
+ * @param int $affId
+ * @param int $daysToCharge
+ * @return int
+ */
+ public function addRecurring($cid, $allowDup, $progId, $merchId, $ccId, $affId, $daysToCharge)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode($allowDup),
+ php_xmlrpc_encode((int)$progId),
+ php_xmlrpc_encode((int)$merchId),
+ php_xmlrpc_encode((int)$ccId),
+ php_xmlrpc_encode((int)$affId),
+ php_xmlrpc_encode($daysToCharge));
+ return $this->methodCaller("InvoiceService.addRecurringOrder", $carray);
+ }
+
+ /**
+ * @method addRecurringOrderAdv
+ * @description creates a subscription for a contact
+ * @note Allows Quantity, Price and Tax
+ * @param int $cid
+ * @param bool $allowDup
+ * @param int $progId
+ * @param int $qty
+ * @param double $price
+ * @param bool $allowTax
+ * @param int $merchId
+ * @param int $ccId
+ * @param int $affId
+ * @param int $daysToCharge
+ * @return int
+ */
+ public function addRecurringAdv($cid, $allowDup, $progId, $qty, $price, $allowTax, $merchId, $ccId, $affId, $daysToCharge)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode($allowDup),
+ php_xmlrpc_encode((int)$progId),
+ php_xmlrpc_encode($qty),
+ php_xmlrpc_encode($price),
+ php_xmlrpc_encode($allowTax),
+ php_xmlrpc_encode($merchId),
+ php_xmlrpc_encode((int)$ccId),
+ php_xmlrpc_encode((int)$affId),
+ php_xmlrpc_encode($daysToCharge));
+ return $this->methodCaller("InvoiceService.addRecurringOrder", $carray);
+ }
+
+ /**
+ * @method calculateAmountOwed
+ * @description calculate amount owed on an invoice
+ * @param int $invId
+ * @return double
+ */
+ public function amtOwed($invId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$invId));
+ return $this->methodCaller("InvoiceService.calculateAmountOwed", $carray);
+ }
+
+ /**
+ * @method getInvoiceId
+ * @description get an Invoice Id attached to a one-time order
+ * @param int $orderId
+ * @return int
+ */
+ public function getInvoiceId($orderId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$orderId));
+ return $this->methodCaller("InvoiceService.getInvoiceId", $carray);
+ }
+
+ /**
+ * @method getOrderId
+ * @description get the Order Id associated with an Invoice
+ * @param int $invoiceId
+ * @return int
+ */
+ public function getOrderId($invoiceId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$invoiceId));
+ return $this->methodCaller("InvoiceService.getOrderId", $carray);
+ }
+
+ /**
+ * @method chargeInvoice
+ * @description Charges an invoice immediately
+ * @param int $invId
+ * @param string $notes
+ * @param int $ccId
+ * @param int $merchId
+ * @param bool $bypassComm
+ * @return array
+ */
+ public function chargeInvoice($invId, $notes, $ccId, $merchId, $bypassComm)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$invId),
+ php_xmlrpc_encode($notes),
+ php_xmlrpc_encode((int)$ccId),
+ php_xmlrpc_encode((int)$merchId),
+ php_xmlrpc_encode($bypassComm));
+ return $this->methodCaller("InvoiceService.chargeInvoice", $carray);
+ }
+
+ /**
+ * @method createBlankOrder
+ * @description creates a blank order for a contact
+ * @param int $conId
+ * @param string $desc
+ * @param date $oDate
+ * @param int $leadAff
+ * @param int $saleAff
+ * @return int
+ */
+ public function blankOrder($conId, $desc, $oDate, $leadAff, $saleAff)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$conId),
+ php_xmlrpc_encode($desc),
+ php_xmlrpc_encode($oDate, array('auto_dates')),
+ php_xmlrpc_encode((int)$leadAff),
+ php_xmlrpc_encode((int)$saleAff));
+ return $this->methodCaller("InvoiceService.createBlankOrder", $carray);
+ }
+
+ /**
+ * @method createInvoiceForRecurring
+ * @description creates an invoice for a subscription
+ * @param int $rid
+ * @return int
+ */
+ public function recurringInvoice($rid)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$rid));
+ return $this->methodCaller("InvoiceService.createInvoiceForRecurring", $carray);
+ }
+
+ /**
+ * @method locateExistingCard
+ * @description locates a creditcard Id from based on the last 4 digits
+ * @param int $cid
+ * @param string $last4
+ * @return int
+ */
+ public function locateCard($cid, $last4)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$cid),
+ php_xmlrpc_encode($last4));
+ return $this->methodCaller("InvoiceService.locateExistingCard", $carray);
+ }
+
+ /**
+ * @method validateCreditCard
+ * @description Validates a Credit Card
+ * @note this will take a CC ID or a CC array
+ * @param mixed $creditCard
+ * @return int
+ */
+ public function validateCard($creditCard)
+ {
+ $creditCard = is_array($creditCard) ? $creditCard : (int)$creditCard;
+
+ $carray = array(
+
+ php_xmlrpc_encode($creditCard));
+ return $this->methodCaller("InvoiceService.validateCreditCard", $carray);
+ }
+
+ /**
+ * @method updateSubscriptionNextBillDate
+ * @description Updates the Next Bill Date on a Subscription
+ * @param int $subscriptionId
+ * @param date $nextBillDate
+ * @return bool
+ */
+ public function updateSubscriptionNextBillDate($subscriptionId, $nextBillDate)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$subscriptionId),
+ php_xmlrpc_encode($nextBillDate, array('auto_dates')));
+ return $this->methodCaller("InvoiceService.updateJobRecurringNextBillDate", $carray);
+ }
+
+ /**
+ * @method recalculateTax
+ * @description recalculates tax for a given invoice Id
+ * @param $invoiceId
+ * @return bool
+ */
+ public function recalculateTax($invoiceId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$invoiceId));
+ return $this->methodCaller("InvoiceService.recalculateTax", $carray);
+ }
+
+ /**
+ * @service Misc iSDK Functions
+ */
+
+ /**
+ * @method infuDate
+ * @description returns properly formatted dates.
+ * @param $dateStr
+ * @return bool|string
+ */
+ public function infuDate($dateStr)
+ {
+ $dArray = date_parse($dateStr);
+ if ($dArray['error_count'] < 1) {
+ $tStamp =
+ mktime($dArray['hour'], $dArray['minute'], $dArray['second'], $dArray['month'],
+ $dArray['day'], $dArray['year']);
+ return date('Ymd\TH:i:s', $tStamp);
+ } else {
+ foreach ($dArray['errors'] as $err) {
+ echo "ERROR: " . $err . " ";
+ }
+ die("The above errors prevented the application from executing properly.");
+ }
+ }
+
+ /**
+ * @method enableLogging
+ * @description Function to Enable/Disable Logging
+ * @param int $log
+ */
+ public function enableLogging($log)
+ {
+ $this->loggingEnabled = $log;
+ }
+
+ /**
+ * @method getHandle
+ * @description Creates CSV Resource
+ * @param string $logname
+ * @return resource
+ */
+ static protected function getHandle($logname)
+ {
+ if (!is_resource(self::$handle)) {
+ self::$handle = fopen($logname, 'a+');
+ }
+ return self::$handle;
+ }
+
+ /**
+ * @method log
+ * @description Function for Logging Calls
+ * @param array $data
+ * @return mixed
+ */
+ private function log($data)
+ {
+ $logdata = $data;
+
+ if ($this->logname == '') {
+ $logname = dirname(__FILE__) . '/apilog.csv';
+ } else {
+ $logname = $this->logname;
+ }
+
+ if (!file_exists($logname)) {
+ $this->getHandle($logname);
+ fputcsv(self::$handle, array('Date', 'Method', 'Call', 'Start Time', 'Stop Time', 'Execution Time', 'Result', 'Error', 'Error Code'));
+ } else {
+ $this->getHandle($logname);
+ }
+
+ if (isset($logdata['Call'][0]->me['string'])) {
+ if ($logdata['Call'][0]->me['string'] == 'CreditCard') {
+ unset($logdata['Call'][1]->me['struct']);
+ $logdata['Call'][1]->me['struct'] = 'Data Removed For Security';
+ }
+ }
+
+ $logdata['Call'][0]->me['string'] = 'APIKEY';
+
+ fputcsv(self::$handle, array(
+ date('Y-m-d H:i:s', $logdata['Now']),
+ $logdata['Method'],
+ print_r(serialize($logdata['Call']), true),
+ $logdata['Start'],
+ $logdata['Stop'],
+ ($logdata['Stop'] - $logdata['Start']),
+ print_r(serialize($logdata['Result']), true),
+ $logdata['Error'],
+ $logdata['ErrorCode']
+ ));
+ fclose(self::$handle);
+
+ }
+
+ public function setLog($logPath)
+ {
+ $this->logname = $logPath;
+ }
+
+ /**
+ * @service Order Service
+ */
+
+ /**
+ * @method placeOrder
+ * @description Builds, creates and charges an order.
+ * @param int $contactId
+ * @param int $creditCardId
+ * @param int $payPlanId
+ * @param array $productIds
+ * @param array $subscriptionIds
+ * @param bool $processSpecials
+ * @param array $promoCodes
+ * @param int $leadAff
+ * @param int $saleAff
+ * @return array
+ */
+ public function placeOrder($contactId, $creditCardId, $payPlanId, $productIds, $subscriptionIds, $processSpecials, $promoCodes, $leadAff = 0, $saleAff = 0)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$contactId),
+ php_xmlrpc_encode((int)$creditCardId),
+ php_xmlrpc_encode((int)$payPlanId),
+ php_xmlrpc_encode($productIds),
+ php_xmlrpc_encode($subscriptionIds),
+ php_xmlrpc_encode($processSpecials),
+ php_xmlrpc_encode($promoCodes),
+ php_xmlrpc_encode((int)$leadAff),
+ php_xmlrpc_encode((int)$saleAff));
+ return $this->methodCaller("OrderService.placeOrder", $carray);
+ }
+
+ /**
+ * @service Product Service
+ */
+
+ /**
+ * @method getInventory
+ * @description retrieves the current inventory level for a specific product
+ * @param int $productId
+ * @return int
+ */
+ public function getInventory($productId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$productId));
+ return $this->methodCaller("ProductService.getInventory", $carray);
+ }
+
+ /**
+ * @method incrementInventory
+ * @description increments current inventory level by 1
+ * @param int $productId
+ * @return bool
+ */
+ public function incrementInventory($productId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$productId));
+ return $this->methodCaller("ProductService.incrementInventory", $carray);
+ }
+
+ /**
+ * @method decrementInventory
+ * @description decrements current inventory level by 1
+ * @param int $productId
+ * @return bool
+ */
+ function decrementInventory($productId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$productId));
+ return $this->methodCaller("ProductService.decrementInventory", $carray);
+ }
+
+ /**
+ * @method increaseInventory
+ * @description increases inventory levels
+ * @param int $productId
+ * @param int $quantity
+ * @return bool
+ */
+ public function increaseInventory($productId, $quantity)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$productId),
+ php_xmlrpc_encode((int)$quantity));
+ return $this->methodCaller("ProductService.increaseInventory", $carray);
+ }
+
+ /**
+ * @method decreaseInventory
+ * @description decreases inventory levels
+ * @param int $productId
+ * @param int $quantity
+ * @return bool
+ */
+ public function decreaseInventory($productId, $quantity)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$productId),
+ php_xmlrpc_encode((int)$quantity));
+ return $this->methodCaller("ProductService.decreaseInventory", $carray);
+ }
+
+ /**
+ * @method deactivateCreditCard
+ * @description deactivate a credit card
+ * @param int $creditCardId
+ * @return bool
+ */
+ public function deactivateCreditCard($creditCardId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$creditCardId));
+ return $this->methodCaller("ProductService.deactivateCreditCard", $carray);
+ }
+
+ /**
+ * @service Search Service
+ */
+
+ /**
+ * @method getSavedSearchResultsAllFields
+ * @description returns a saved search with all fields
+ * @param int $savedSearchId
+ * @param int $userId
+ * @param int $page
+ * @return array
+ */
+ public function savedSearchAllFields($savedSearchId, $userId, $page)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$savedSearchId),
+ php_xmlrpc_encode((int)$userId),
+ php_xmlrpc_encode((int)$page));
+ return $this->methodCaller("SearchService.getSavedSearchResultsAllFields", $carray);
+ }
+
+ /**
+ * @method getSavedSearchResults
+ * @description returns a saved search with selected fields
+ * @param int $savedSearchId
+ * @param int $userId
+ * @param int $page
+ * @param array $fields
+ * @return array
+ */
+ public function savedSearch($savedSearchId, $userId, $page, $fields)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$savedSearchId),
+ php_xmlrpc_encode((int)$userId),
+ php_xmlrpc_encode((int)$page),
+ php_xmlrpc_encode($fields));
+ return $this->methodCaller("SearchService.getSavedSearchResults", $carray);
+ }
+
+ /**
+ * @method getAllReportColumns
+ * @description returns the fields available in a saved report
+ * @param int $savedSearchId
+ * @param int $userId
+ * @return array
+ */
+ public function getAvailableFields($savedSearchId, $userId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$savedSearchId),
+ php_xmlrpc_encode((int)$userId));
+ return $this->methodCaller("SearchService.getAllReportColumns", $carray);
+ }
+
+ /**
+ * @method getDefaultQuickSearch
+ * @description returns the default quick search type for a user
+ * @param int $userId
+ * @return array
+ */
+ public function getDefaultQuickSearch($userId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$userId));
+ return $this->methodCaller("SearchService.getDefaultQuickSearch", $carray);
+ }
+
+ /**
+ * @method getAvailableQuickSearches
+ * @description returns the available quick search types
+ * @param int $userId
+ * @return array
+ */
+ public function getQuickSearches($userId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$userId));
+ return $this->methodCaller("SearchService.getAvailableQuickSearches", $carray);
+ }
+
+ /**
+ * @method quickSearch
+ * @description returns the results of a quick search
+ * @param int $quickSearchType
+ * @param int $userId
+ * @param string $filterData
+ * @param int $page
+ * @param int $limit
+ * @return array
+ */
+ public function quickSearch($quickSearchType, $userId, $filterData, $page, $limit)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($quickSearchType),
+ php_xmlrpc_encode((int)$userId),
+ php_xmlrpc_encode($filterData),
+ php_xmlrpc_encode((int)$page),
+ php_xmlrpc_encode((int)$limit));
+ return $this->methodCaller("SearchService.quickSearch", $carray);
+ }
+
+ /**
+ * @service Service Call Service
+ * @note also known as Ticket System. This service is deprecated
+ */
+
+ /**
+ * @method addMoveNotes
+ * @description Adds move notes to existing tickets
+ * @param array $ticketList
+ * @param string $moveNotes
+ * @param int $moveToStageId
+ * @param int $notifyIds
+ * @return bool
+ */
+ public function addMoveNotes($ticketList, $moveNotes, $moveToStageId, $notifyIds)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode($ticketList),
+ php_xmlrpc_encode($moveNotes),
+ php_xmlrpc_encode($moveToStageId),
+ php_xmlrpc_encode($notifyIds));
+ return $this->methodCaller("ServiceCallService.addMoveNotes", $carray);
+ }
+
+ /**
+ * @method moveTicketStage
+ * @description Moves a Ticket Stage
+ * @param int $ticketID
+ * @param string $ticketStage
+ * @param string $moveNotes
+ * @param string $notifyIds
+ * @return bool
+ */
+ public function moveTicketStage($ticketID, $ticketStage, $moveNotes, $notifyIds)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$ticketID),
+ php_xmlrpc_encode($ticketStage),
+ php_xmlrpc_encode($moveNotes),
+ php_xmlrpc_encode($notifyIds));
+ return $this->methodCaller("ServiceCallService.moveTicketStage", $carray);
+ }
+
+ /**
+ * @service Shipping Service
+ */
+
+ /**
+ * @method getAllShippingOptions
+ * @description get a list of shipping methods
+ * @return array
+ */
+ public function getAllShippingOptions()
+ {
+ $carray = array();
+ return $this->methodCaller("ShippingService.getAllShippingOptions", $carray);
+ }
+
+ /**
+ * @method getAllConfiguredShippingOptions
+ * @description get a list of shipping methods
+ * @return array
+ */
+ public function getAllConfiguredShippingOptions()
+ {
+ $carray = array();
+ return $this->methodCaller("ShippingService.getAllShippingOptions", $carray);
+ }
+
+ /**
+ * @method getFlatRateShippingOption
+ * @description retrieves details on a flat rate type shipping option
+ * @param int $optionId
+ * @return array
+ */
+ public function getFlatRateShippingOption($optionId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$optionId));
+ return $this->methodCaller("ShippingService.getFlatRateShippingOption", $carray);
+ }
+
+ /**
+ * @method getOrderTotalShippingOption
+ * @description retrieves details on a order total type shipping option
+ * @param int $optionId
+ * @return array
+ */
+ public function getOrderTotalShippingOption($optionId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$optionId));
+ return $this->methodCaller("ShippingService.getOrderTotalShippingOption", $carray);
+ }
+
+ /**
+ * @method getOrderTotalShippingRanges
+ * @description retrieves the pricing range details for the given Order Total shipping option
+ * @param int $optionId
+ * @return array
+ */
+ public function getOrderTotalShippingRanges($optionId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$optionId));
+ return $this->methodCaller("ShippingService.getOrderTotalShippingRanges", $carray);
+ }
+
+ /**
+ * @method getProductBasedShippingOption
+ * @description retrieves details on a product based type shipping option
+ * @param int $optionId
+ * @return array
+ */
+ public function getProductBasedShippingOption($optionId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$optionId));
+ return $this->methodCaller("ShippingService.getProductBasedShippingOption", $carray);
+ }
+
+ /**
+ * @method getProductShippingPricesForProductShippingOption
+ * @description retrieves the pricing for your per product shipping options
+ * @param int $optionId
+ * @return array
+ */
+ public function getProductShippingPricesForProductShippingOption($optionId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$optionId));
+ return $this->methodCaller("ShippingService.getProductShippingPricesForProductShippingOption", $carray);
+ }
+
+ /**
+ * @method getOrderQuantityShippingOption
+ * @description retrieves details on a order quantity type shipping option
+ * @param int $optionId
+ * @return array
+ */
+ public function getOrderQuantityShippingOption($optionId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$optionId));
+ return $this->methodCaller("ShippingService.getOrderQuantityShippingOption", $carray);
+ }
+
+ /**
+ * @method getWeightBasedShippingOption
+ * @description retrieves details on a weight based type shipping option
+ * @param int $optionId
+ * @return array
+ */
+ public function getWeightBasedShippingOption($optionId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$optionId));
+ return $this->methodCaller("ShippingService.getWeightBasedShippingOption", $carray);
+ }
+
+ /**
+ * @method getWeightBasedShippingRanges
+ * @description retrieves the weight ranges for a weight based type shipping option
+ * @param int $optionId
+ * @return array
+ */
+ public function getWeightBasedShippingRanges($optionId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$optionId));
+ return $this->methodCaller("ShippingService.getWeightBasedShippingRanges", $carray);
+ }
+
+ /**
+ * @method getUpsShippingOption
+ * @description retrieves the details around a UPS type shipping option
+ * @param int $optionId
+ * @return array
+ */
+ public function getUpsShippingOption($optionId)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$optionId));
+ return $this->methodCaller("ShippingService.getUpsShippingOption", $carray);
+ }
+
+ /**
+ * @service Web Form Service
+ */
+
+ /**
+ * @method getMap
+ * @description returns web form titles and Id numbers from the application
+ * @return array
+ */
+ public function getWebFormMap()
+ {
+ $carray = array();
+ return $this->methodCaller("WebFormService.getMap", $carray);
+ }
+
+ /**
+ * @method getHTML
+ * @description returns the HTML for the given web form
+ * @param int $webFormId
+ * @return string
+ */
+ public function getWebFormHtml($webFormId = 0)
+ {
+ $carray = array(
+
+ php_xmlrpc_encode((int)$webFormId));
+ return $this->methodCaller("WebFormService.getHTML", $carray);
+ }
+
+ /**
+ * @service Web Tracking Service
+ */
+
+ /**
+ * @method getWebTrackingScriptTag
+ * @description returns the web tracking javascript code
+ * @return string
+ */
+ public function getWebTrackingServiceTag()
+ {
+ $carray = array();
+ return $this->methodCaller("WebTrackingService.getWebTrackingScriptTag", $carray);
+ }
+
+ /**
+ * @method getWebTrackingScriptUrl
+ * @description returns the url for the web tracking code
+ * @return string
+ */
+ public function getWebTrackingScriptUrl()
+ {
+ $carray = array();
+ return $this->methodCaller("WebTrackingService.getWebTrackingScriptUrl", $carray);
+ }
+
+}
+
+?>
\ No newline at end of file
diff --git a/xmlrpc-3.0/Changelog b/xmlrpc-3.0/Changelog
new file mode 100644
index 0000000..d2cad21
--- /dev/null
+++ b/xmlrpc-3.0/Changelog
@@ -0,0 +1,1573 @@
+2009-09-05 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * xmlrpcs.inc, xmlrpcs.inc: remove code that was left for compatibility
+ with php 4; use __METHOD__ constant for error messages instead of hardcoded
+ values
+
+ * xmlrpcs.inc: catch exceptions thrown during execution of invoked methods;
+ check for $_SERVER having been disabled via php.ini and log an error if so
+
+ * server.php, testsuite.php: add a new test and server method for exception
+ catching in the server
+
+ * xmlrpc.inc: added new method SetUserAgent to client to allow having different
+ user-agent http headers
+
+ * tagged and released as 3.0.0 beta
+
+2009-08-05 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * xmlrpc_wrappers.inc: improve compatibility with php 5.0 when registering
+ class/object methods
+
+2009-08-02 - G. Giunta (giunta.gaetano@gmail.com) thanks Laurens
+
+ * xmlrpcs.inc: add a new member var in server class to allow fine-tuning
+ of the encoding of returned values when the server is in 'phpvals' mode;
+ allow servers in 'xmlrpcvals' mode to also register plain php functions by
+ defining them in the dispatch map with an added option:
+ 'parameters_type' => 'phpvals' (feature request #2806628)
+
+ * xmlrpc.inc: added new method xmrlpc_client::SetCurlOptions($array) to
+ allow extra flexibility in tweaking http config, such as explicitly
+ binding to an ip address (feature request #2787468); fix bad encoding if
+ same object is encoded twice using php_xmlrpc_encode; removed some by-ref
+ assignments and declarations
+
+2009-07-31 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * xmlrpc.inc: add support for dateTime objects in both in php_xmlrpc_encode
+ and as parameter for constructor of xmlrpcvals; add support for timestamps
+ as parameter for constructor of xmlrpcvals; add option 'dates_as_objects' to
+ php_xmlrpc_decode to return dateTime objects for xmlrpc datetimes
+
+ * benchmark.php, xmlrpc_wrappers.inc: remove usage of split(), deprecated in
+ php 5.3
+
+ * benchmark.php: fixed url of server page used for testing; improved
+ verification of correspondence of test results; added more variants for
+ http options comparison
+
+ * verify_compat.php: check for php version 5 for client side too
+
+ * makefile: remove from build the compat directory
+
+2009-07-26 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * server.php: remove usage of ereg*(), deprecated in php 5.3
+
+2009-07-16 - G. Giunta (giunta.gaetano@gmail.com) thanks Jean-Jacques Sarton
+
+ * xmlrpc.inc: add support for the from the apache library, both
+ in input and output (feature request #...)
+
+ * xmlrpc.inc, testsuite.php: remove usage of split(), deprecated in php 5.3
+
+ * testsuite.php: flush better results with output_buffering on
+
+ * server: php: avoid one warning about static function calls
+
+2009-07-02 - G. Giunta (giunta.gaetano@gmail.com) thanks Heiko Stuebner
+
+ * xmlrpc.inc: fix: when checking the parameters against the signatures xmlrpc
+ checks for "array" but PHP returns "Array" resulting in a not matches signature
+
+2009-05-07 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * replace all usage of '= & new' with '= new', as this is deprecated in php 5
+ and has been shown to cause problems too
+
+2009-05-06 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * create php4 branch, rename trunk to 3.0.0beta - it will be the php5-only version
+
+ * xmlrpc.inc: removed test for php version and inclusion of compat patches for really
+ really old versions of php 4
+
+2009-03-16 - G. Giunta (giunta.gaetano@gmail.com) thanks Tommaso Trani
+
+ * move from CVS to SVN on sf.net; file layout now is the same as in packaged lib
+
+ * xmlrpc.inc: fix php warning when receiving 'false' in a bool value
+
+ * Makefile, doc/Makefile: alter to follow new file layout
+
+ * tagged and released as 2.2.2
+
+2009-02-03 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * debugger/action.php: improve code robustness when parsing system.listmethods
+ and system.describemethods call
+
+ * xmlrpc.inc: format floating point values using the correct decimal separator
+ even when php locale is set to one that uses comma (bug #2517579);
+ use feof() to test if socket connections are to be closed instead of the
+ number of bytes read (bug #2556209)
+
+2008-10-29 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * xmlrpcs.inc: allow add_to_map server method to add docs for single params, too
+
+2008-09-20 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * xmlrpc_wrappers.inc: added the possibility to wrap for exposure as xmlrpc
+ methods plain php class methods, object methods and even whole classes
+
+ * testsuite.php, server.php: added test cases for the new code
+
+2008-09-07 - G. Giunta (giunta.gaetano@gmail.com) thanks Bruno Zanetti Melotti
+
+ * xmlrpc.inc: be more tolerant in detection of charset in http headers (fix for bug #2058158)
+
+2008-04-05 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * xmlrpc.inc: fix encoding of UTF8 chars outside of the BMP
+
+ * xmlrpcs.inc: fix detection of zlib.output_compression (thanks xbert)
+
+2008-03-06 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * tagged and released as 2.2.1
+
+ * Makefile: improve usage on windows xp despite cmd's broken mkdir
+
+2007-10-26 - G. Giunta (giunta.gaetano@gmail.com) thanks sajo_raftman
+
+ * xmlrpc.inc: remove one warning in xmlrpc_client creator
+
+2007-10-26 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * xmlrpc.inc: improve support for windows cp1252 character set (still
+ commented in the code)
+
+2007-09-05 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * xmlrpc.inc, xmlrps.inc: do not try to set invalid charsets as output for
+ xml parser, even if user set them up for internal_encoding (helps encoding
+ to exotic charsets, while decoding to UTF8)
+
+2007-09-05 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * xmlrpc.inc: fix parsing of '1e+1' as valid float
+
+2007-09-01 - G. Giunta (giunta.gaetano@gmail.com), thanks Frederic Lecointre
+
+ * xmlrpcs.inc: allow errorlevel 3 to work when prev. error handler was a static method
+
+ * testsuite.php: fix test on setCookie()
+
+2007-08-31 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * xmlrpc.inc: minor fix in cookie parsing
+
+2007-07-31 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * xmlrpc.inc: Fix usage of client::setcookie() for multiple cookies in non-ssl mode
+
+2007-07-26 - G. Giunta (giunta.gaetano@gmail.com) thanks Mark Olive
+
+ * xmlrpc.inc: Fix for bug # 1756274 (usage of cookies in ssl mode)
+
+2007-04-28 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * xmlrpc.inc: give more detailed curl information when DEBUG = 2; fix handling
+ of case where curl w. keepalive is used and one connection of many fails
+
+ * testsuite improvements: add one testcase; give feedbcak while tests are
+ running
+
+2007-04-01 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * doc/makefile, doc/custom.fo.xsl: improve pdf rendering of php source code
+
+ * makefile: recover version number from source instead of having it hardcoded
+
+2007-03-10 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * doc/makefile, doc/convert.php, doc/*.xsl: created customizations xslt to
+ produce a documentation more in line with the php manual, esp. with regards
+ to functions synopsis; added jellyfish book cover as local resource and a
+ screenshot of the debugger too; various updates to the manual source; added
+ a php script to highlight examples inside html docs
+
+2007-03-09 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * debugger/action.php: css tweak for IE
+
+ * added phpunit license file in the phpunit directory
+
+ * added link to license (on sf.net site) to many files
+
+2007-03-04 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * Makefile, doc/makefile: assorted improvements
+
+2007-03-03 - G. Giunta (giunta.gaetano@gmail.com)
+
+ * xmlrpc.inc: micro-optimization in declaration of global vars xmlrpcerr, xmlrpcstr
+
+2007-02-25 Gaetano Giunta
+
+ * removed a couple of warnings emitted in testsuite.php
+
+ * doc/makefile: added command for invocation of xxe to generate docs
+
+ * better rendering of docs in xml+css format for function prototypes
+
+ * updated documentation
+
+ * tagged and released as 2.2
+
+2007-02-22 Gaetano Giunta
+
+ * debugger: workaround for case of magic_quotes_gpc being set (properly
+ unescape user input); fix case of user not setting msg id in jsonrpc case
+ when executing a remote method; allow strings, false, true and null as msg id
+
+2007-02-13 Gaetano Giunta
+
+ * testsuite.php: added one test for automatic encoding/decoding case
+
+2007-02-05 Gaetano Giunta
+
+ * xmlrpc.inc: slightly faster encoding of UTF8 data to ascii
+
+2007-01-11 Gaetano Giunta
+
+ * xmlrpc.inc: when calling client::multicall() with an unspecified http version,
+ use the client default rather than the fixed 'http 1.0'
+
+2006-09-17 Gaetano Giunta
+
+ * xmlrpc.inc, xmlrpcs.inc, testsuite.php: added support for and
+ system.getCapabilities, and one more testcase to go with it
+
+2006-09-05 Gaetano Giunta
+
+ * xmlrpc.inc: fix support for https through proxies; client parses debug
+ messages sent by client even for compressed responses;
+
+ * testsuite.php, parse_args.php: added 3 test cases for proxy connections
+
+2006-09-01 Gaetano Giunta
+
+ xmlrpc_wrappers.inc: add two more options in wrap_xmlrpc_method and fix
+ typo to allow obj encoding
+
+2006-08-28 Gaetano Giunta
+
+ * xmlrpc_wrappers.inc: more options added to wrap_php_function and
+ wrap_xmlrpc_method
+
+ * xmlrpc.inc: pave the way to support for
+
+ * doc/xmlrpc_php.xml documentation updated
+
+ * tagged and released as 2.1
+
+2006-08-25 Gaetano Giunta
+
+ * xmlrpc.inc: stricter parsing of incoming messages: detect two DATA elements
+ inside an ARRAY, a STRUCT or SCALAR inside an already filled VALUE
+
+ * testsuite.php: added two testcases to check for the above cases
+
+2006-08-24 Gaetano Giunta
+
+ * xmlrpc.inc: more code optimization in xmlrpcval::serialize() and
+ php_xmlrpc_encode(); fixed bug where struct elements with non-ascii chars
+ in their name would not be properly encoded
+
+ * testsuite.php: added a testcase for the new bug
+
+2006-08-23 Gaetano Giunta
+
+ * remove old code left in comments across many files; many more javadoc
+ comments added
+
+ * xmlrpc.inc: a bit of code optimization: reorder switch() statements of
+ xml parsing element handlers; inline code for xmlrpcval() - this breaks
+ new xmlrpcval('true') and changes error msgs on new xmlrpcval($x, 'invalid_type')
+
+ * testsuite.php: change according to above
+
+ * benchmark.php: basic support for xdebug 2 profiling
+
+2006-08-22 Gaetano Giunta
+
+ * xmlrpc.inc: addscalar() and addstruct() where not returning 1 when adding
+ data to an already formed value
+
+2006-08-21 Gaetano Giunta
+
+ * xmlrpcs.inc, xmlrpc.inc: added support for emulating the xmlrpc-extension
+ API (the full emulation layer is part of the extras package);
+ fix support for the HTTP 'deflate' encoding
+
+ * xmlrpc.inc: better support for http compression with and without CURL;
+ a minor decoding speedup; added a new function: php_xmlrpc_decode_xml(),
+ that will convert into the appropriate object the xml representation of
+ either a request, response or a single value; log reception of invalid
+ datetime values
+
+ * xmlrpcs.inc: add a new parameter and return type to server->service();
+ let server->add_to_map() accept method definitions without parameter types
+
+ * xmlrpc_wrappers.inc: more logging of errors; wrap_php_functions now takes
+ more options; better support for jsonrpc; escape quote chars when wrapping
+ remothe servers / remote methods
+
+ * added cvs Id tag to files that missed it; speling fixes; updated NEWS files
+
+2006-08-07 Gaetano Giunta
+
+ * assorted fixes to make the suite more compatible with php 4.0.5 and 5.x
+
+2006-07-02 Gaetano Giunta
+
+ * xmlrpc_warppers.inc: added new function to wrap entire remote server into
+ a local php class; changed default calling synopsis of wrap_remote_method,
+ to ease passing multiple options at a time (but old syntax still works!)
+
+ * updated makefile, debugger/action.php in accord with the above
+
+2006-06-30 Gaetano Giunta
+
+ * added to debugger capability to generate json-rpc code stubs
+
+ * added to debugger capability to load and launch self correctly if
+ controller.php is called directly from outside processes (single url access)
+
+2006-06-26 Gaetano Giunta
+
+ * moved wrap_php_functions and wrap_xmlrpc_method into a file of their own.
+ This will let us add further stub functionality without the base lib growing too much.
+ All of the files that reference this functionality have been modified accordingly.
+
+ * made wrap_xmlrpc_method generate better code (with php type juggling), and
+ some phpdoc for the generated function, too
+
+ * added to debugger an option to produce for the user the generated php code
+ for wrapping a call to a remote method into a php function
+
+2006-06-22 Gaetano Giunta
+
+ * xmlrpcs.inc: added description of parameters for system.xxx methods (useful with
+ html-self-documenting servers);
+ server->service() now returns response object, in case user has need for it...
+
+ * xmlrpc.inc: save full response payload into xmlrpcresp obj for better debugging
+
+2006-06-15 Gaetano Giunta
+
+ * verify_compat.php: more tests
+
+2006-06-09 Gaetano Giunta
+
+ * xmlrpcs.inc: fixed sending of compressed responses when output compression
+ is already enabled in php.ini
+
+ * verify_compat.php: split tests between server and client cases
+
+2006-05-29 Gaetano Giunta
+
+ * added new file: verify_compat.php, to help troubleshooting platform
+ support for the library; added it to makefile, too
+
+2006-05-24 Gaetano Giunta
+
+ * xmlrpc.inc: removed residual usage of regexp in favour of pregexps; fixed
+ a bug in specifying Host http header with non std ports
+
+2006-05-23 Gaetano Giunta
+
+ * xmlrpc.inc: improvements to wrap_php_function: let it deal correctly
+ with php functions returning xmlrpcresp objs; make it generate also
+ docs for single parameters (useful for documenting_xmlrpc_server class)
+
+2006-05-22 Gaetano Giunta
+
+ * xmlrpc.inc, xmlrpcs.inc: minor performance tuning updates: replaced
+ some explode vs. split, ereg vs. preg, single vs. double quotes
+
+ * xmlrpc.inc: fix wrap_xmlrpc_method to NOT rebuild php objects received
+ from the server by default, as it might pose a security risk
+
+2006-04-24 Gaetano Giunta
+
+ * minor fixes makefiles. Tagged and released as 2.0 final
+
+2006-04-22 Gaetano Giunta
+
+ * debugger/*: added option to set cainfo; improve web layout
+
+ * xmlrpc.inc: set sslverifypeer to TRUE instaed of 1 by default
+
+ * doc/php_xmlrpc.xml: documentation updates
+
+2006-04-21 Gaetano Giunta
+
+ * xmlrpc.inc: added option to set ca certs dir instead of single cert
+ (used to validate server in https connetions)
+
+2006-04-18 Gaetano Giunta
+
+ * xmlrpc.inc: fixed bug in xmlrpcval::structmemexists()
+
+ * testsuite.php: added test case for xmlrpcval::structmemexists()
+
+2006-04-03 Gaetano Giunta
+
+ * xmlrpc.inc: add support for Digest and NTLM authentication, both to server
+ and to proxies (note: must use CURL for this to work)
+
+ * debugger/*: add support for Digest/NTLM auth to remote servers
+
+2006-03-19 Gaetano Giunta
+
+ * xmlrpc.inc: fix a bug parsing of 'true' bool values;
+ added a new method to the client class: SetCaCertificate;
+ add column number in xml parsing error messages;
+ fix serialization of messages to ISO-8859-1 charset with php 5 (by adding
+ encoding to the xml prologue of generated messages)
+
+ * xmlrpcs.inc: correct detection of charset in http headers;
+ add column number in xml parsing error messages;
+ fix serialization of responses to ISO-8859-1 charset with php 5 (by adding
+ encoding to the xml prologue of generated responses)
+
+ * testsuite.php: added two more tests on charset encoding
+
+ * NEWS: update info for impending release
+
+2006-03-23 Gaetano Giunta
+
+ * added a new demo file: simple_call.php
+
+2006-02-20 Gaetano Giunta
+
+ * xmlrpcs.inc: more error checking and logging with regard to user-coded
+ method handler functions not being well behaved;
+ fix a case where error handler would not be reset upon user function
+ returning not valid xmlrpresp
+
+ * xmlrpc.inc: fix bug in detection of php 4.3.0
+
+ * Makefile: fix uppercase filenames
+
+2006-02-15
+
+ * xmlrpc.inc: parse 'true' and 'false' as valid booleans, even though the
+ spec is quite clear on that; fix small bug w. internal_encoding = utf8; add
+ definition of $GLOBALS['xmlrpcNull'] for extensibility, e.g. json or
+ extensions to the xmlrpc spec
+
+2006-02-05 Gaetano Giunta
+
+ * xmlrpc.inc: fix bug in wrap_xmlrpc_method if client passed to function has
+ return_type=phpvals
+
+ * all demo files: review code, add more comments and information
+
+ * added 2 demo files: proxy.php (implementing an xmlrpc proxy server) and
+ wrap.php (showing usage of wrap_method_call)
+
+2006-02-04 Gaetano Giunta
+
+ * xmlrpc.inc: fix bug in multicall in case of no fallback and server error
+
+2006-01-30 Gaetano Giunta
+
+ * xmlrpc.inc: fix recursive serialization of xmlrpcvals loosing UTF8 charset;
+ correctly set type field of xmlrpcvals returned by send() calls
+
+ * xmlrpcs.inc: add to server checks for correct return type of user-coded
+ method handling function; tolerate xmlrpcval instead of xmlrpcresp
+
+ * minor change in xmlrpcresp internals, to ease subclassing (store payload
+ in an internal var on serialize(), same as xmlrpcclient does)
+
+2006-01-22 Gaetano Giunta
+
+ * benchmark.php: do not run http 1.1 tests if CURL notfound
+
+ * Released as 2.0 Rc3
+
+2006-01-19 Gaetano Giunta
+
+ * xmlrpc.inc: make xmlrpc_client::setDebug() accept int values instead of
+ boolean. At level 2, the request payload is printed to screen before being
+ sent; fix bug with repeated sending of the same msg object and using request
+ compression w. php 5.1.2 (objects passed by ref by default!!!)
+
+ * xmlrpcs.inc: fix detection of clients accepting compressed responses
+
+ * comment.php: remove warnings due to liberal usage of $HTTP_POST/GET_VARS
+
+ * benchmark.php: add a test using http compression of both requests and
+ responses
+
+ * testsuite.php: added test for fix in xmlrpc.inc
+
+2006-01-17 Gaetano Giunta
+
+ * xmlrpcs.php: minor fix: do not raise a PHP warning when std server is
+ called via GET (global HTTP_RAW_POST_DATA undefined). Some might have called
+ it a security breach (path disclosure)...
+
+2006-01-15 Gaetano Giunta
+
+ * testsuite.php: minor fix to expected date format in http cookie hedaer
+ to cope with PHP 5.1.2
+
+2006-01-05 Gaetano Giunta
+
+ * xmlrpcs.inc: merge code from the 'extras' subclass that allows server
+ to register plain php functions in dispatch map instead of functions
+ accepting a single xmlrpcmgs obj parameter.
+ One step closer to the kitchen sink!!!
+
+2005-12-31 Gaetano Giunta
+
+ * xmlrpcs.inc: let the server accept 'class::method' syntax in the dispatch
+ map
+
+ * testsuite.php, server.php: added new tests for the recent charset encoding
+ capabilities
+
+2005-12-24 Gaetano Giunta
+
+ * xmlrpc.inc: correctly serialize() string xmlrpcvals that have been
+ created out of non-string php variables, when internal encoding is UTF8;
+ serialize to '0' int and double values created out of non-string php
+ variables, eg. 'hello', instead of creating invalid xmlrpc;
+ extend the php_xmlrpc_encode function to allow serializing string values
+ to charsets other tha US-ASCII;
+ minor tweak to xml parsing to allow correct parsing of empty strings when
+ in 'direct to php values' mode
+
+ * xmlrpcs.inc: advances in system.multicall with plain php values
+
+2005-12-17 Gaetano Giunta
+
+ * xmlrpcs.inc: let the functions implementing the system.* methods work
+ fine when called with plain php values as parameters instead of xmlrpcmsg
+ objects (multicall not quite finished yet...);
+ encode level 3 debug info as base64 data, to avoid charset encoding hell
+
+ * xmlrpc.inc: added a new xmlrpc_2_php_type function, to get the name of
+ php types corresponding to xmlrpc types;
+ in debug mode, when detecting base64 server debug info, print it out fine
+
+ * server.php: cosmetic fixes
+
+2005-12-09 Gaetano Giunta
+
+ * xmlrpc.inc: remove one warning emitted when received xml contains an
+ unknown tag; remove warnings emitted when custom error handler is set
+ and user calls php_xmlrpc_encode/decode without the 2nd parameter
+
+ * xmlrpcs.inc: added a param to service(), to allow the server to parse
+ data other than the POST body (useful for subclassing and debugging);
+ reworked the implementation of server debug messages at debug level 2:
+ since the debug info generated has no known charset, and putting it back
+ into the response's xml would most likely break it, send it back to the
+ client as a base64 encoded comment. Clients can decode it if they need it...
+ Add some more javadocs
+
+ * testsuite.php: modified the string test, to see if the server can echo
+ back to the client the received data without breaking the response's xml
+
+2005-12-05 Gaetano Giunta
+
+ * xmlrpc.inc, xmlrpcs.inc: let server and client objects decide if they
+ want to use some charset encoding other than US-ASCII for serialized data:
+ add a new var to both objects, and lots of parameters to function calls
+ that took none up to now;
+ refactored server method service() and parseRequest(), implementing a
+ new parserequestHeaders() method to explicitly deal with HTTP
+
+2005-12-01 Gaetano Giunta
+
+ * moved the jsonrpc implementation and the new wsdl stuff to a separate
+ CVS module; updated the makefile to reflect it
+
+2005-11-24 Gaetano Giunta
+
+ * modified php_xmlrpc_decode() to work on xmlrpcmessages too, besides
+ xmlrpcvals. To achieve this, added a new method: xmlrpcmsg::kindOf()
+
+2005-11-22 Gaetano Giunta
+
+ * released as 2.0 RC2
+
+2005-11-21 Gaetano Giunta
+
+ * xmlrpc.inc: fix warnings about references for PHP 4.1.X
+
+ * Whitespace cleanup on all the lib
+
+2005-11-16 Gaetano Giunta
+
+ * xmlrpc.inc: rewritten xmlrpc_encode_entitites adding two extra parameters
+ that specify input and output charset encodings. This corrects the bug that
+ prevented native UTF-8 strings to be correctly serialized (to have them
+ encoded the user must set $xmlrpc_internalencoing appropriately).
+
+ * xmlrpc.inc: added new method xmlrpcmsg::parseResponseHeaders(), refactoring
+ parseResponse(). This makes the code more modular and eases subclassing.
+
+ * xmlrpc.inc: set cookies and http headers to xmlrpcresp objs even when calls
+ to send() do not complete correctly
+
+ * added new file: jsonrpcs.inc, to accomodate server jsonrpc objects in the future
+
+ * jsonrpc.inc: slow progress...
+
+2005-11-10 Gaetano Giunta
+
+ * xmlrpc.inc: fixed the xmlrpc_client send and sendpayloadhttps methods
+ to fix errors in calling https servers;
+ added a new xmlrpc_client->setkey method to allow usage of client-side ssl
+ certs in recent php builds;
+ added to xmlrpcresp objects a content_type var, to be used in HTTP headers
+
+ * xmlrpcs.inc: separate generation of content-type http header and xml prologue
+ from the service() method, to ease subclassing
+
+2005-11-03 Gaetano Giunta
+
+ * xmlrpc.inc: moved the 'text/xml' mimetype string as class var of the xmlrpcmsg
+ object instead of having it cabled into xmlrpc_client->send(): this allows to
+ create subclasses of xmlrpcmsg that use a different mimetype
+
+ * jsonrpc.inc: added a new file, with an extremely experimental set of classes,
+ designed to implement a json-rpc client and server, taking advantage of the
+ existing xml-rpc infrastructure
+
+2005-10-28 Gaetano Giunta
+
+ * xmlrpc.inc: changed constructor method for xmlrpcresp, making it smarter in
+ case user does not declare the type of value it is passing to it;
+ minor changes in serialization of xmlrpcresp with error codes, so that it
+ utputs LF instead of CRLF on windows boxes after an FTP transfer of the code, too
+
+2005-10-26 Gaetano Giunta
+
+ * xmlrpc.inc: added a new var of class xmlrpc_client, indicating what kind of
+ object will be stored in the value() of xmlrpcresp's gotten from the send()
+ method: xmlrpxc objects, plain php variables or raw xml. This allow the coder
+ to make use of xmlrpc_decode for better performances if he wishes so.
+ Modified creator of xmlrpcresp class to allow it to distinguish between being
+ created out of raw xml or a plain php string (in the former case, serialization
+ is still possible, opening a new world of opportunity for server-side programming:
+ the php function implementing a web service has to provide the xml for the
+ return value on its own).
+ Modified xmlrpc_client::multicall() to suit; also added a new parameter which
+ allows calls to multicall without automatic fallback to many-calls in case of
+ error (speeding up the process of doing a failed multicall() call quite a bit)
+ Fixed two bugs in guess_encoding.
+ Audited all regexps and fixed some.
+ xmlrpc_client::send() does not call xmlrpcmsg::parseresponsefile() anymore.
+ Shuffled parseresponse() a little bit
+
+ * testsuite.php: added a new testcase for the modifications to multicall():
+ now we test the case where xmlrpc_client returns php values, too
+
+2005-10-24 Gaetano Giunta
+
+ * xmlrpc.inc: fixed guess_encoding() to always return uppercase chars
+
+ * added new file: benchmark.php. It contains a few tests used to evaluate
+ speed of the lib in common use cases
+
+ * added file parse_args.php, containing common code for benchmark and
+ testsuite, and modified testsuite.php accordingly
+
+ * modified makefile adding new files
+
+ * testsuite.php: added a couple of new test cases; fixed one warning
+ emitted in php 5 E_STRICT mode
+
+2005-10-20 Gaetano Giunta
+
+ * xmlrpc.inc: modify 3d param of ParseResponse(), allowing the function to
+ return the raw xml received as value of the xmlrpcresponse object.
+ This allows eg. to have epi-xmlrpc decode the xml for faster execution.
+
+2005-10-09 Gaetano Giunta
+
+ * xmlrpc.inc: fixed error that prevented usage of HTTPS (the client
+ always determined that ssl support was not present)
+
+2005-10-03 Gaetano Giunta
+
+ * xmlrpc.inc, xmlrpcs.inc: revert direction of stack growth during xml
+ parsing for faster execution time; add support for detecting charset
+ encoding of received xml; add support for cookies; better parsing of
+ javadoc when building stub code in wrap_php_function; add a lot of
+ javadoc comments everywhere; rewrite most error messages
+
+ * testsuite.php: add many tests for newly introduced features
+
+ * server.php: add a couple of new functions to support debugging new
+ features
+
+ * debugger: add switches to enable all the latest lib features; minor
+ improvements to layout
+
+ * synch included phpunit with latest PEAR release
+
+ * reorganize files included in the distribution in a new hierarchy of folders
+
+ * bump revision number to 2.0RC1 and release
+
+2005-8-14 Miles Lott
+
+ * xmlrpc.inc, xmlrpcs.inc: Remove all use of eval() to avoid potential
+ security hole.
+
+ * As of this release we are no longer php3-compatible.
+
+2005-8-10 Miles Lott
+
+ * xmlrpc.inc, xmlrpcs.inc: Switched to using $GLOBALS instead of calling
+ global $varname
+
+2005-07-22 Miles Lott
+
+ * Removed: bug_* files
+
+2005-07-14 Gaetano Giunta
+
+ * debugger: added a workaround to disable using the debugger for attacking
+ older versions of the lib
+
+ * testsuite.php: added code to test wrap_xmlrpc_method;
+ use different wording for failed tests
+
+ * xmlrpcs.inc: change for() with foreach() in system.* methods implementations;
+ remove a possible cause of php warning;
+
+ * xmlrpc.inc: let wrap_php_function and wrap_xmlrpc_method find suitable
+ function names if default function names are already in use;
+ correct wrap_xmlrpc_method to not set http protocol to 1.0 when not asked to;
+ detect curl compiles without SSL
+
+2005-07-14 Gaetano Giunta
+
+ * xmlrpc.inc: more auto-fix of xmlrpc_client path: '' -> '/';
+ change to the method used for detecting failed evals (php 4.0.x compatibility);
+ complete rework of return-by-ref functions to comply with php 4.4.0
+
+ * xmlrpcs.inc: change to the method used for detecting failed evals (php 4.0.x
+ compatibility)
+
+ * testsuite.php: major rewrite of the multi- tests, to give better feedback on
+ number of failed tests;
+ flush html page title to screen before starting tests;
+
+2005-07-13 Gaetano Giunta
+
+ * xmlrpc.inc: let xmlrpcmsg creator be forgiving of target paths that miss the
+ starting '/' char;
+ completely reworked assign-by-ref to be compliant with php 4.4.0 stricter
+ warnings
+
+ * testsuite.php: added ability to be run from cli: (really dumb) separation of
+ html and plain text outputs + parsing of argv parameters
+
+2005-07-12 Gaetano Giunta
+
+ * xmlrpc.inc: compatibility fixes with PHP versions 4.0.x (and remove some for
+ PHP 3)
+
+ * xmlrpcs.inc: compatibility fixes for PHP 4.0.x versions
+
+ * testsuite.php: better support for running with php versions 4.0.x;
+ do not generate runtime errors but finish tests anyway if some calls to
+ localhost fail;
+ correctly detect a localhost port different from 80 for running tests against
+
+2005-07-11 Gaetano Giunta
+
+ * xmlrpc.inc: preliminary building of method signature and docs in
+ wrap_php_function;
+ fix a bug in extracting function description from javadoc block in
+ wrap_php_function;
+ small fix for better compatibility with php < 4.2.0
+
+ * added compat subdir with extra code, taken form PEAR package Compat, to let
+ the lib run fine with php 4 versions < 4.1
+
+2005-07-10 Gaetano Giunta
+
+ * xmlrpc.inc: some nazi whitespace corrections;
+ declared global $xmlrpcBoolean too (was the only one missing);
+ used @eval inside getval() to have less path disclosure security reports filed
+ in the future;
+ added new global var: $xmlrpcValue, to be used in server dispatch maps as
+ placeholder for a param which can be of any kind;
+ big chunks (but still incomplete) of javadoc parsing in wrap_php_function
+ + changed type of return val - now it is the complete array to be put in the
+ dispatch map
+
+ * xmlrpcs.inc: let previous error handler be called by server to handle errors
+ even if in debug level 3;
+ default to compress responses if zlib installed;
+ added a new val useful for only checking number (not type) of params in method
+ calls;
+ let user use object methods in dispatch map using the
+ array($obj, 'fmethodname') format
+
+ * server.php: Added code called by testsuite.php to exercise registration of
+ object methods as xmlrpc methods and auto-registration of php functions as xmlrpc
+ methods
+
+ * testsuite.php: added tests to exercice server registering object methods as
+ xmlrpc methods and automatic registration of php functions as server methods;
+ added a hint to enable debug if some test goes wrong;
+ renamed https test for better clarity
+
+2005-07-07 Gaetano Giunta
+
+ * xmlrpc.inc: added function to be used for 'guestimating' charset encoding of
+ received xml (not activated yet)
+
+ * server.php: Let server compress content by default if user asks so: it allows
+ testsuite to check for compressed responses
+
+ * testsuite.php: added suite of tests for compressed responses; test CURL
+ (http1.1) with all possible compression combinations too
+
+2005-07-06 Gaetano Giunta
+
+ * xmlrpc.inc: Enable setting usage of keepalives on/off (for CURL cases);
+ implement compression of xmlrpc requests; enable new syntax of xmlrpclient
+ constructor: 1 - allow preferred http method to be set at creation time,
+ 2 - allow user to insert a single complete URL as only parameter and parse it;
+ try to detect if curl is present whether it has been compiled w. zlib to enable
+ automatically the reception of compressed responses
+
+ * xmlrpcs.inc: do not add into logs the content of the request, if it was
+ received gzipped/deflated, to avoid breaking the xml sent back as response
+ (NB: might be investigated further: is the problem caused by windows chars in
+ the range 128-160 ?)
+
+ * testsuite.php: run all localhost tests 2 more times, to stress request
+ compression;
+ run all localhost tests in a row using keepalives, to test keepalive
+ functionality
+
+2005-07-05 Gaetano Giunta
+
+ * xmlrpc.inc: let CURL pass back to caller function the complete PHP headers
+ as it did before: it enables better logging / debugging of communication;
+ small change to the way CURL declares its ability to receive compressed
+ messages (fix for the case where zlib is compiled in PHP but not in curl);
+ added Keep-alive (ON BY DEFAULT) for http 1.1 and https messages (had to modify
+ a lot of functions for that);
+ always make sure a 'Connection: close' header is sent with curl connections if
+ keep-alive is not wanted
+
+ * phpunit.php: switched to PEAR PHPUnit (rel 1.2.3), since it is maintained a
+ lot more than the old version we were using
+
+ * added new folder with code of phpunit classes
+
+ * testsuite.php: added a new run of tests to check for compliance of client
+ when using http 1.1;
+ switched to PEAR PHPUnit classes;
+ divided test for client ability to do multicall() into 2 separate tests
+
+2005-06-30 Gaetano Giunta
+
+ tagged and released version 1.1.1, backporting security fixes from HEAD
+
+2005-06-28 Gaetano Giunta
+
+ * xmlrpcs.inc: fix changes introuced yesterday in a rush;
+ do not list system.* methods for a server that has them explicitly disabled
+
+ * bug_inject.xml: new test case used to check for code injection vulnerability
+
+ * testsuite.php: added a test case for zero parameters method calls;
+ added two test cases for recently found code injection vulnerabilities
+
+2005-06-27 Gaetano Giunta
+
+ * xmlrpc.inc: (tentative) fix for security problem reported by
+ security@gulftech.org: we were not properly php-escaping xml received for
+ BASE64 and NAME tags;
+ some more patching related to junk received in xml messages/responses: if the
+ PHP code built from the parsed xml is broken, catch any generated errors
+ without echoing it to screen but take note of the error and propagate to user
+ code
+
+ * xmlrpcs.inc: some more patching related to junk received in xml messages/
+ responses: if the PHP code built from the parsed xml is broken, catch any
+ generated errors without echoing it to screen but take note of the error and
+ propagate to user code
+
+2005-06-24 Gaetano Giunta
+
+ * xmlrpc.inc: fixed php_xmlrpc_encode detection of php arrays (again!);
+ removed from wrap_php_function the part about setting a custom error handler
+ (it can be activated using the more general $server->setdebug(3) anyway)
+
+ * xmlrpcs.inc: added to server the capability to trap all processing errors
+ during execution of user functions and add them to debug info inside responses;
+ return a (new) xmlrpcerr response instead of raising some obscure php execution
+ error if there is an undefined function in the dispatch map
+
+ * testsuite.php: Added new testcases for recently implemented stuff
+
+2005-06-23 Gaetano Giunta
+
+ * xmlrpc.inc: added new method: xmlrpcval->structmemexists, to check for
+ presence of a wanted struct member without having to loop through all members;
+ fix wrap_php_functions: correctly return false for php internal functions,
+ whose param list is unknown;
+ let addscalar fail as it should if called on struct vals;
+ fix addstruct: do not fail when called for adding stuff to initialized structs;
+ removed a warning generated when calling addscalar with inexistent type;
+ massive code review for speed: replaced each() loops with foreach(), removed
+ lots of useless assignments and duplications of data;
+ added 'http11' as valid method param for xmlrpclient->send: makes use of curl
+ for sending http 1.1 requests;
+ changed a couple '=' into '=&' where objects are returned;
+ fixed wrap_php_function() to better detect php errors while processing wrapped
+ function
+
+ * xmlrpcs.inc: Fix php warnings generated when clients requested method
+ signature / description for a method that had none in its dispatch map;
+ turned server->debug into an integer value that will change the amount of
+ logging going as comments into xmlrpc responses
+
+ * server.php: set default server debug level to 2
+
+ * testsuite.php: removed calls to deleted functions (xmlrpc_encode,
+ xmlrpc_decode);
+ added html page title describing target servers used for tests;
+ added an assign-by-ref
+
+ * phpunit.php: Do not consider as failures PHP 5 E_STRICT errors (arbitrary
+ choice, but lib is targeted at PHP 4)
+
+2005-06-22 Gaetano Giunta
+
+ * xmlrpc.inc: removed lottsa old code that had been left in commented
+
+ * xmlrpc.inc: fixed setting of proxy port
+
+ * xmlrpc.inc: removed one warning when trying to decompress junk sent as
+ deflated response
+
+ * xmlrpc.inc: changed the error messages (but not the code) that will be found
+ in xmlrpcresponses when there are socket errors, to differentiate from HTTP
+ errors
+
+ * xmlrpc.inc: refactored xmlrpcclient->sendpayloadHTTPS: now it calls a new
+ method (sendpayloadCURL) that could be used also for generating HTTP 1.1
+ requests
+
+ * xmlrpc.inc: added two new methods: wrap_php_function and wrap_xmlrpc_method:
+ designed to let the lazy programmer automagically convert php functions to
+ xmlrpc methods and vice versa. Details are in the code
+
+ * debugger/*: added initial revision of a 'universal xmlrpc debugger'
+
+2005-06-20 Gaetano Giunta
+
+ * xmlrpc.inc: replace usage of 'echo' with error_log when errors arise
+ in manipulation of xmlrpcval objects
+
+ * xmlrpc.inc: replaced with in dump function
+
+ * xmlrpc.inc: added method structsize to xmlrpcval class (alias for arraysize)
+
+ * xmlrpc.inc: addarray() now will add extra members to an xmlrpcval object
+ of array type; addstruct() can be used to add members to an xmlrpcval object
+ of struct type
+
+ * xmlrpcs.inc: Added member allow_system_funcs to server: controls whether the
+ server accepts or not calls to system.* functions
+
+2005-05-10 Gaetano Giunta
+
+ * xmlrpc.inc: fix regression in php_xmlrpc_encode when encoding php hashes;
+ fix decompression of gzip/deflated xmlrpc responses;
+ set user agent string correctly in SSL mode (was forgetting lib name);
+ add allowed encoding http headers in requests;
+ do not pass http headers back from curl to parseresponse, to avoid re-decoding
+ compressed xml or http 100 headers
+
+ * xmlrpcs.inc: added method setDebug;
+ renamed compress_output to compress_response;
+ do not try to set http headers if they have already been sent, because trying
+ to do so will raise a PHP error, and if headers have been sent something has
+ gone wrong already (shall we send a meaningful error response instead?)
+
+2005-05-08 Gaetano Giunta
+
+ * xmlrpcs.inc, xmlrpcs.inc: reverted to usage of '=& new' for better
+ performance on (some) php4 installs.
+ NB: PHP 3 compatibility is deprecated from now on!
+
+ * xmlrpc.inc: decode xmlrpc boolean type to native php boolean
+
+ * xmlrpcs.inc, xmlrpcs.inc: switched $_xh[$parser] to $_xh, since indexing
+ an array by object will give a warning in php 5 (and we were resetting the
+ array of _xh elements on every call anyway)
+
+ * xmlrpc.inc: commented unused code used originally for escaping content
+
+ * xmlrpc.inc: commented deprecated methods xmlrpc_encode and xmlrpc_decode
+
+ * xmlrpc.inc: php_xmlrpc_encode: encode integer-indexed php arrays as xmlrpc
+ arrays instead of structs; if object given to encode is an xmlrpcval return it
+ instead of reencoding (makes easier calling encode on an array of xmlrpcvals)
+
+ * xmlrpcs.inc: added $debug field to server class; if false will prevent
+ the server from echoing debug info back to the client as xml comment
+
+ * xmlrpcs.inc: let the server add to the debug messages the complete request
+ payload received and (if php installed as apache module) http headers, so that
+ the client in debug mode can echo a complete fingerprint of the communication
+
+ * xmlrpcs.inc: changed API of ParseRequest method: now it cannot be called
+ without a 'data' parameter; added 2nd parameter (http encoding); changed the
+ call to this method from inside service() method
+
+ * xmlrpc.inc, xmlrpcs.inc: enable both server and client to parse compressed xml
+ (if php is compiled with zlib); client should also be able to decode chunked
+ http encoding
+
+ * xmlrpc.inc: add support for proxies (only basic auth supported); default port
+ is 8080 (if left unspecified)
+
+ * xmlrpc.inc: use lowercase for names of http headers received (makes using
+ them much simpler, since servers can use any upper/lowercase combination)
+
+ * xmlrpc.inc: bumped version number to '2.0 beta'
+
+2005-05-08 Gaetano Giunta
+
+ * release of version 1.1
+
+2005-04-24 Gaetano Giunta
+
+ * xmlrpcs.inc: removed charset declaration from xml prologue of responses,
+ since we are now escaping all non-ascii chars in an encoding-independent way
+
+ * bug_http.xml: modified to exercise some extra functonality of the lib
+ (it should now be failed by the current PEAR implementation of the lib)
+
+ * xmlrpc.inc: bumped up rev. number to 1.1
+
+ * doc/xmlrpc_php.xml, doc/announce1_1.txt: documentation updates
+
+ * Makefile: updated to reflect new xml doc source, modified filelist
+
+2005-04-17 Gaetano Giunta
+
+ * client.php, agesort.php, introspect.php, introspect_demo.php,
+ which.php, test.pl, test.py: use as default target the server.php page hosted
+ on phpxmlrpc.sf.net
+
+ * server.php: fix for register_globals off; refer to docs on phpxmlrpc.sf.net
+
+2005-04-15 Miles Lott
+
+ code formatting and comments
+
+2005-04-03 Gaetano Giunta
+
+ * xmlrpc.inc: make use of global var $xmlrpcName in building User_Agent HTTP
+ header (in conjunction with $xmlrpcVersion)
+
+ * agesort.php, client.php, comment.php, dicuss.php, mail.php, server.php,
+ which.php: various janitorial fixes
+ + always html escape content received from xmlrpc server or from user input
+ + make the scripts run fine with register_globals off an register_long_arrays off
+ + always use the functions php_xmlrpc_en(de)code, even if the EPI extension
+ is not installed
+ + in mail.php, allow user to see script source even if support for .phps files
+ is not configured in the local web server
+
+ * testsuite.php: better detection of local webserver hostname for running tests
+ against (if the user did not supply a webserver name)
+
+2005-03-21 Gaetano Giunta
+
+ * xmlrpcs.inc: revert to a PHP3 compatible script (change '=& new' to '= new')
+
+ * xmlrpc.inc: revert to a PHP3 compatible script (lottsa fixes)
+
+ * testsuite.php: default to using local server as test target if no user
+ provided values are available instead of heddley.com server
+
+ * testsuite.php: play nice to PHP3 in retrieving user-passed values
+
+ * testsuite.php: fix constructor method name for a type of tests
+
+ * phpunit.php: fix all cases of call-time-pass-by-ref
+
+ * phpunit.php: rename Exception class to _Exception if the script is run with
+ PHP 5 (exception is a reserverd word)
+
+2005-03-19 Gaetano Giunta
+
+ * xmlrpc.inc: fixed bug in new http header parsing code in case there is
+ no correct separator between response headers and body
+
+ * xmlrpc.inc: added recognizing and stripping of HTTP/1.1 100 response headers
+
+ * xmlrpc.inc: strip extra whitespace from response body, as well as any junk
+ that comes after the last tag. It allows the server code to
+ be put on public providers that add e.g. javascript advertising to served pages
+
+ * xmlrpc.inc: removed unused parts of code, trailing whitespace
+
+ * xmlrpc.inc: fix possible bug (?) in xmlrpc_ee for BOOLEAN values: true was
+ being handled differently than false
+
+ * testsuite.php: added a new file-based test to stress the response parsing
+ modifications recently introduced; enabled debugging for file based tests
+
+2005-03-15 Gaetano Giunta
+
+ * xmlrpc.inc: fixed missing declaration of global vars in xmlrpc_dh,
+ sendpayloadhttps and sendpayloadhttp10
+
+ * xmlrpc.inc: changed error message for invalid responses: 'enable debugging'
+ is more clear that 'enabling debugging' (the user is being encouraged to do it)
+
+ * xmlrpc.inc: rewrote HTTP response header parsing. It should be more tolerant
+ of invalid headers, give more accurate error messages and be marginally faster,
+ too.
+
+ * xmlrpc.inc: cosmetic whitespace fixes and remove useless one-liners
+
+ * xmlrpc.inc: build a shorter PHP command line to be evaluated for rebuilding
+ values from parsed xml: use '$val =& nex xmlrpcval("value")' for string values
+ instead of '$val =& nex xmlrpcval("value", $xmlrpcString)'
+
+ * xmlrpc.inc: fix change introduced 2005/01/30 moving call to curl_close()
+ too early: it did not work on error situations
+
+ * testsuite.php: fix name of testAddingTest method, renamed testErrosString
+ into testErrorString and removed useless warning for register_globals=off case
+
+2005-02-27 Gaetano Giunta
+
+ * xmlrpc.inc: do not echo XML parsing error to screen (it is already dumped
+ into error log)
+
+ * xmlrpc.inc: set hdrs field into response object in case of XML parsing error
+ (uniform behaviour with other responses)
+
+2005-02-26 Gaetano Giunta
+
+ * xmlrpc.inc: use global var $xmlrpcVersion as number for user agent string
+
+ * xmlrpcs.inc: eliminate server side PHP warning and give back to caller
+ a better error msg in case the called method exists but no signature matches
+ the number of parameters
+
+2005-02-20 Gaetano Giunta
+
+ * xmlrpc.inc: accept a + sign in front of floats / integers, since the spec
+ clearly mentions it
+
+ * xmlrpc.inc, xmlrpcs.inc: renamed function XmlEntities to xmlrpc_encode_entitites,
+ to avoid using the same name as an array already defined
+
+ * xmlrpc.inc: fix bug introduced with escaping of UTF8 chars in xmlrpc error
+ responses: correct behaviour is to escape chars inside serialize(), not when
+ calling the xmlrpcresp creator
+
+ * testsuite.php: made test suite more friendly to modern PHP configs, allowing
+ register_globals to be off and to set in the URL all testing parameters;
+ added tests for newly introduced fixes; renamed existing tests acording to the
+ docs inside phpunit.php (e.g. no subclass of TestCase should have a name
+ starting with test...)
+
+2005-02-19 Gaetano Giunta
+
+ * xmlrpc.inc: accept patch 683153 by mah0: if timeout is set, allow all socket
+ operations to timeout at the given time, not only the socket connection
+
+2005-02-13 Gaetano Giunta
+
+ * xmlrpc.inc: be tolerant to double values received in exponential notation:
+ even though the spec forbids their usage PHP is fine with them
+
+ * xmlrpc.inc: fix bug: new xmlrpcval('-1') was creating an empty value instead
+ of a string value!
+
+ * xmlrpc.inc, xmlrpcs.inc: fix the payload encoding changes introduced by
+ Andres Salomon on 2004-03-17: sending named html entities inside an xml chunk
+ makes it invalid, and thus renders the lib absolutely non-interoperable with
+ any other xmlrpc implementation; moreover the current implementation only ever
+ worked for non-ascii requests, while breaking client-parsing of responses
+ containing non-ascii chars.
+ The principle of using entities is preserved though, because it allows the
+ client to send correct xml regardless of php internal charset encoding vs.
+ xml request charset encoding, but using 'character references' instead.
+
+ * xmlrpc.inc: encode (non-ascii) chars into charset entities also for error
+ strings
+
+ * xmlrpcs.inc: encode (non-ascii) chars into charset entities also for debug
+ messages
+
+ * xmlrpcs.inc: added 'Accept-Charset' header in http request to let the server
+ know what kind of charset encoding we do expect to be used for responses
+
+ * xmlrpc.inc, xmlrpcs.inc: explicitly tell the xml parser what charset the
+ application expects to receive content in (notably strings). A new variable,
+ $xmlrpc_internalencoding, (defaulting to ISO-8859-1) defines what charset the
+ parser will use for passing back string xmlrpcvals to the PHP application
+ (both server-side and client-side).
+ This allows transparent usage of e.g. UTF-8 for encoding xml messages between
+ server and client and ISO-8859-1 for internal string handling.
+ ISO-8859-1 is, AFAIK, PHP internal encoding for all installs except
+ mbstring-enabled ones.
+
+2005-02-12 Gaetano Giunta
+
+ * xmlrpcs.inc: use '$var =& new(' construct to assign objects: on older versions
+ of PHP objects are first built then copied over if the ampersand is omitted.
+ Using it should make the code a little bit faster...
+
+ * doc/xmlrpc.php: update lib version number, release date in preparation for
+ next release
+
+ * makefile: update lib version number in preparation for next release
+
+ * xmlrpc.inc: split up parsing of xmlrpc INT and DOUBLE values. This allows
+ finer-grained control over valid values: now the '.' char is not allowed
+ any more inside int values.
+
+ * xmlrpc.inc: fix for bug #560303: ints and doubles starting with '0' chars are
+ no more parsed as octal values
+
+2005-01-30 Gaetano Giunta
+
+ * xmlrpc.inc: Modifed last change by Miles: the functions php_xmlrpc_encode
+ and php_xmlrpc_decode are now always defined, regardless of the existence of
+ XMLRPC-EPI. This allows users to start using these functions as the 'default'
+ functions, and pave the way for future deprecation of xmlrpc_encode/encode
+ while maintaining a stable API.
+
+ * xmlrpc.inc: use '$var =& new(' construct to assign objects: on older versions
+ of PHP objects are first built then copied over if the ampersand is omitted.
+ Using it should make the code a little bit faster...
+
+ * xmlrpc.inc: close curl connection as soon as possible for https requests:
+ it could save some memory / resources.
+
+ * xmlrpc.inc: added some extra info in the PHP error log message generated
+ when an invalid xmlrpc integer/float value is encountered and we try to
+ deserialize it.
+
+ * xmlrpc.inc: added @ char before fsockopen to avoid echoing useless warnings
+ when connection to server fails; added the same to avoid echoing warnings when
+ deserializing data of an unknown type
+
+ * xmlrpc.inc: reset the _xh array on each xmlrpc call: otherwise a new array
+ member is created for each consecutive call and never destroyed, thus making it
+ impossible to build an xmlrpc-client daemon beacuse of memory leaking.
+
+ * xmlrpc.inc: declare global the variables that are used as 'constants',
+ so that xmlrpc.inc will work even if it is included from within a function
+
+2004-12-27 Miles Lott
+ * xmlrpc.inc: A new constant, XMLRPC_EPI_ENABLED, is defined depending on
+ the existence of the function, xmlrpc_decode. This function will exist in
+ PHP if the extension, XMLRPC-EPI (http://xmlrpc-epi.sourceforge.net), is
+ loaded. It defines the functions xmlrpc_encode and xmlrpc_decode, which
+ will conflict with functions of the same name in xmlrpc.inc. If this
+ extension is loaded, we instead use the names php_xmlrpc_encode and
+ php_xmlrpc_decode. Please look at server.php, testsuite.php, etc., for
+ how this should be handled if using these functions.
+
+2003-04-17 Andres Salomon
+ * xmlrpc.inc: encode strings using htmlentities() instead of
+ htmlspecialchars(), and add xmlrpc_html_entity_xlate(). This
+ should fix longstanding issues with sending weird chars (from
+ non-USASCII codesets like UTF-8, ISO-8859-1, etc) that caused
+ the xml parser to choke. Multi-byte chars are now changed to
+ entities before sending, so that the xmlrpc server doesn't need
+ to know the encoding type of the POST data.
+ * xmlrpcs.inc: call xmlrpc_html_entity_xlate before parsing
+ request packet. The parser chokes on unknown entities (the
+ entities created by htmlentities() are exactly that; html
+ entities, not xml entities), so they must be converted from
+ name form (é) to numerical form (é).
+
+2003-01-12 Andres Salomon
+
+ * released 1.0.99.2.
+ * Makefile: separate doc/Makefile a bit more from Makefile,
+ and add clean rules.
+
+2003-01-10 Andres Salomon
+
+ * xmlrpc.inc: xmlrpcresp and parseResponse cleanups; variable
+ name renames ('xv' to 'val', for example), type checking, and
+ stricter default values.
+ * xmlrpc.inc: fix xmlrpcresp's faultcode; return -1 for FAULT
+ responses from the server whose faultcodes don't reflect any
+ errors.
+
+2003-01-08 Andres Salomon
+
+ * xmlrpc.inc: rename $_xh[$parser]['ha'] to
+ $_xh[$parser]['headers'].
+ * xmlrpc.inc: fix bugs related to $_xh[$parser]['headers];
+ some places treated this as an array, others as a scalar.
+ Treat unconditionally as an array. Also wrap header debugging
+ output in PRE tags.
+
+2002-12-17 Andres Salomon
+
+ * released 1.0.99.
+ * Makefile: changed the tarball format/dist rule to a more
+ conventional form, as well as normal release updates.
+ * xmlrpc.inc: added setSSLVerifyPeer and setSSLVerifyHost; as
+ of curl 7.10, various certificate checks are done (by default).
+ The default for CURLOPT_SSL_VERIFYHOST is to ensure the common
+ name on the cert matches the provided hostname. This breaks a
+ lot of stuff, so allow users to override it.
+ * doc/xmlrpc_php.sgml: updated documentation accordingly.
+
+2002-09-06 Geoffrey T. Dairiki
+
+ Add support for system.multicall() to both the client
+ and the server.
+
+ * testsuite.php: Add new tests 'testServerMulticall',
+ and 'testClientMulticall'.
+
+ * xmlrpc.inc: Added new error messages for system.multicall().
+ * xmlrpcs.inc: Added new procedure call system.multicall().
+ See http://www.xmlrpc.com/discuss/msgReader$1208 for details.
+
+ * xmlrpc.inc: Added system.multicall functionality to
+ xmlrpc_client. xmlrpc_client::send can now take an array of
+ xmlrpcmsg's as an argument. In that case it will attempt
+ to execute the whole array of procure calls in a single
+ HTTP request using system.multicall(). (If that attempt fails,
+ then the calls will be excuted one at a time.) The return
+ value will be an array of xmlrpcresp's (or 0 upon transport
+ failure.)
+
+2001-11-29 Edd Dumbill
+
+ * xmlrpc.inc: fixed problem with processing HTTP headers that
+ broke any payload with more than one consecutive newline in it.
+ also initialise the 'ac' array member to empty string at start.
+ * testsuite.php: added unit test to exercise above bug
+ * xmlrpcs.inc: fixed uninitialized variable $plist
+
+2001-09-25 Edd Dumbill
+
+ * xmlrpc.inc: applied urgent security fixes as identified by Dan
+ Libby
+
+2001-08-27 Edd Dumbill
+
+ * xmlrpc.inc: Merged in HTTPS support from Justin Miller, with a
+ few additions for better traceability of failure conditions. Added
+ small fix from Giancarlo Pinerolo. Bumped rev to 1.0. Changed
+ license to BSD license.
+
+2001-06-15 Edd Dumbill
+
+ * xmlrpcs.inc: Added \r into return MIME headers for server class
+
+2001-04-25 Edd Dumbill
+
+ * server.php: Added interop suite of methods.
+
+2001-04-24 Edd Dumbill
+
+ * testsuite.php: added in test case for string handling bug.
+
+ * xmlrpc.inc: merged in minor fixes from G Giunta to fix
+ noninitialization. Created new method, getval(), which includes
+ experimental support for recreating nested arrays, from Giunta and
+ Sofer. Fixed string handling bug where characters after
+ but before weren't ignored. Added in support for native
+ boolean type into xmlrpc_encode (Giunta).
+
+ * xmlrpcs.inc: updated copyright notice
+
+2001-01-15 Edd Dumbill
+
+ * xmlrpc.inc: fixed bug with creation of booleans. Put checks in
+ to ensure that numbers were really numeric. Fixed bug with
+ non-escaping of dollar signs in strings.
+
+ * testsuite.php: created test suite.
+
+2000-08-26 Edd Dumbill
+
+ * xmlrpcs.inc: added xmlrpc_debugmsg() function which outputs
+ debug information in comments inside the return payload XML
+
+ * xmlrpc.inc: merged in some changes from Dan Libby which fix up
+ whitespace handling.
+
+ * xmlrpcs.inc: added Content-length header on response (bug from
+ Jan Varga . This means you can no longer print
+ during processing
+
+ * xmlrpc.inc: changed ereg_replace to str_replace in several
+ places (thanks to Dan Libby for this).
+
+ * xmlrpc.inc: added xmlrpc_encode() and xmlrpc_decode() from Dan
+ Libby--these helper routines make it easier to work in native PHP
+ data structures.
+
+2000-07-21 Edd Dumbill
+
+ * xmlrpc.inc: added xmlrpc_client::setCredentials method to pass
+ in authorization information, and modified sendPayload* methods to
+ send this OK. Thanks to Grant Rauscher for the impetus to do this.
+ Also, made the client send empty if there are no
+ parameters set by the user.
+
+ * doc/xmlrpc_php.sgml: updated documentation to reflect recent
+ changes
+
+
+2000-07-18 Edd Dumbill
+
+ * server.php: added examples.invertBooleans method to server as a
+ useful test method for boolean values.
+
+ * xmlrpc.inc: rearranged the way booleans are handled to fix
+ outstanding problems. Fixed calling addScalar() on arrays so it
+ works. Finally fixed backslashification issues to remove the
+ problem will dollar signs disappearing.
+
+ * booltest.php: really fixed booleans this time.
+
+2000-06-03 Edd Dumbill
+
+ * xmlrpcs.inc: made signature verification more useful - now
+ returns what it found was wrong
+
+ * xmlrpc.inc: fixed bug with decoding dateTimes. Also fixed a bug
+ which meant a PHP syntax error happened when attempting to receive
+ empty arrays or structs. Also fixed bug with booleans always being
+ interpreted as 'true'.
+
+ * server.php: Added validator1 suite of tests to test against
+ validator.xmlrpc.com
+
+
+2000-05-06 Edd Dumbill
+
+ * released 1.0b6
+
+ * added test.pl and test.py, Perl and Python scripts that exercise
+ server.php somewhat (but not a lot)
+
+ * added extra fault condition for a non 200 OK response from the
+ remote server.
+
+ * added iso8601_encode() and iso8601_decode() to give some support
+ for passing dates around. They translate to and from UNIX
+ timestamps. Updated documentation accordingly.
+
+ * fixed string backslashification -- was previously a little
+ overzealous! new behavior is '\' --> '\\' and '"' -->
+ '\"'. Everything else gets left alone.
+
+2000-04-12 Edd Dumbill
+
+ * updated and bugfixed the documentation
+
+ * fixed base 64 encoding to only happen at serialize() time,
+ rather than when a base64 value is created. This fixes the double
+ encoding bug reported by Nicolay Mausz
+ . The same approach ought to be taken with
+ encoding XML entities in the data - this is a TODO.
+
+ * integrated further code from Peter Kocks: used his new code for
+ send(), adding a second, optional, parameter which is a timeout
+ parameter to fsockopen()
+
+1999-10-11 Edd Dumbill
+
+ * added bug fixes from Peter Kocks
+
+1999-10-10 Edd Dumbill
+
+ * updated the documentation
+
+1999-10-08 Edd Dumbill
+
+ * added system.* methods and dispatcher, plus documentation
+
+ * fixed bug which meant request::getNumParams was returning an
+ incorrect value
+
+ * added signatures into the dispatch map. This BREAKS
+ COMPATIBILITY with previous releases of this code
+
+1999-08-18 Edd Dumbill
+
+ * made entity encoding and decoding transparent now on string
+ passing.
+
+ * de-globalised the globals in the parse routines, using an
+ associative array to hold all parser state $_xh
+
+ * changed default input encoding to be UTF-8 to match expectation
+
+ * separated out parseResponse into parseResponse and
+ parseResponseFile so that you can call parseResponse on a string
+ if you have one handy
+
+1999-07-20 Edd Dumbill
+
+ * Moved documentation into Docbook format
+
+1999-07-19 Edd Dumbill
+
+ * Added an echo server into server.php and echotest.php, a client
+ which will exercise the new echo routine.
+
+ * Added test for no valid value returned: in this case will now
+ throw the error "invalid payload"
+
+ * Added serialize() method to xmlrpcresp to return a string with
+ the response serialized as XML
+
+ * Added automatic encoding and decoding for base64 types
+
+ * Added setDebug() method to client to enable HTML output
+ debugging in the client
+
+1999-07-08 Edd Dumbill
+
+ * Improved XML parse error reporting on the server side to send it
+ back in a faultCode packet. expat errors now begin at 100
+
+1999-07-07 Edd Dumbill
+
+ * Changed the structmem and arraymem methods of xmlrpcval to always
+ return xmlrpc vals whether they referred to scalars or complex
+ types.
+
+ * Added the server class and demonstrations
+
+ * Fixed bugs in the XML parsing and reworked it
+
+
+$Id: ChangeLog,v 1.96 2009/03/16 19:39:11 ggiunta Exp $
diff --git a/xmlrpc-3.0/Makefile b/xmlrpc-3.0/Makefile
new file mode 100644
index 0000000..e71bcdd
--- /dev/null
+++ b/xmlrpc-3.0/Makefile
@@ -0,0 +1,123 @@
+# Makefile for phpxmlrpc library
+# $Id: Makefile,v 1.37 2008/03/06 22:37:19 ggiunta Exp $
+
+### USER EDITABLE VARS ###
+
+# path to PHP executable, preferably CLI version
+PHP=/usr/local/bin/php
+
+# path were xmlrpc lib files will be copied to
+PHPINCLUDEDIR=/usr/local/lib/php
+
+# mkdir is a thorny beast under windows: make sure we can not use the cmd version, running eg. "make MKDIR=mkdir.exe"
+MKDIR=mkdir
+
+#find too
+FIND=find
+
+
+#### DO NOT TOUCH FROM HERE ONWARDS ###
+
+# recover version number from code
+# thanks to Firman Pribadi for unix command line help
+# on unix shells lasts char should be \\2/g )
+export VERSION=$(shell egrep "\$GLOBALS *\[ *'xmlrpcVersion' *\] *= *'" lib/xmlrpc.inc | sed -r s/"(.*= *' *)([0-9a-zA-Z.-]+)(.*)"/\2/g )
+
+LIBFILES=lib/xmlrpc.inc lib/xmlrpcs.inc lib/xmlrpc_wrappers.inc
+
+EXTRAFILES=extras/test.pl \
+ extras/test.py \
+ extras/rsakey.pem \
+ extras/workspace.testPhpServer.fttb
+
+DEMOFILES=demo/vardemo.php \
+ demo/demo1.txt \
+ demo/demo2.txt \
+ demo/demo3.txt
+
+DEMOSFILES=demo/server/discuss.php \
+ demo/server/server.php \
+ demo/server/proxy.php
+
+DEMOCFILES=demo/client/agesort.php \
+ demo/client/client.php \
+ demo/client/comment.php \
+ demo/client/introspect.php \
+ demo/client/mail.php \
+ demo/client/simple_call.php \
+ demo/client/which.php \
+ demo/client/wrap.php \
+ demo/client/zopetest.php
+
+TESTFILES=test/testsuite.php \
+ test/benchmark.php \
+ test/parse_args.php \
+ test/phpunit.php \
+ test/verify_compat.php \
+ test/PHPUnit/*.php
+
+INFOFILES=Changelog \
+ Makefile \
+ NEWS \
+ README
+
+DEBUGGERFILES=debugger/index.php \
+ debugger/action.php \
+ debugger/common.php \
+ debugger/controller.php
+
+
+all: install
+
+install:
+ cd lib && cp ${LIBFILES} ${PHPINCLUDEDIR}
+ @echo Lib files have been copied to ${PHPINCLUDEDIR}
+ cd doc && $(MAKE) install
+
+test:
+ cd test && ${PHP} -q testsuite.php
+
+
+### the following targets are to be used for library development ###
+
+# make tag target: tag existing working copy as release in cvs.
+# todo: convert dots in underscore in $VERSION
+tag:
+ cvs -q tag -p release_${VERSION}
+
+dist: xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz
+
+xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz: ${LIBFILES} ${DEBUGGERFILES} ${INFOFILES} ${TESTFILES} ${EXTRAFILES} ${DEMOFILES} ${DEMOSFILES} ${DEMOCFILES}
+ @echo ---${VERSION}---
+ rm -rf xmlrpc-${VERSION}
+ ${MKDIR} xmlrpc-${VERSION}
+ ${MKDIR} xmlrpc-${VERSION}/demo
+ ${MKDIR} xmlrpc-${VERSION}/demo/client
+ ${MKDIR} xmlrpc-${VERSION}/demo/server
+ ${MKDIR} xmlrpc-${VERSION}/test
+ ${MKDIR} xmlrpc-${VERSION}/test/PHPUnit
+ ${MKDIR} xmlrpc-${VERSION}/extras
+ ${MKDIR} xmlrpc-${VERSION}/lib
+ ${MKDIR} xmlrpc-${VERSION}/debugger
+ cp --parents ${DEMOFILES} xmlrpc-${VERSION}
+ cp --parents ${DEMOCFILES} xmlrpc-${VERSION}
+ cp --parents ${DEMOSFILES} xmlrpc-${VERSION}
+ cp --parents ${TESTFILES} xmlrpc-${VERSION}
+ cp --parents ${EXTRAFILES} xmlrpc-${VERSION}
+ cp --parents ${LIBFILES} xmlrpc-${VERSION}
+ cp --parents ${DEBUGGERFILES} xmlrpc-${VERSION}
+ cp ${INFOFILES} xmlrpc-${VERSION}
+ cd doc && $(MAKE) dist
+# on unix shells last char should be \;
+ ${FIND} xmlrpc-${VERSION} -type f ! -name "*.fttb" ! -name "*.pdf" ! -name "*.gif" -exec dos2unix {} ;
+ -rm xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz
+ tar -cvf xmlrpc-${VERSION}.tar xmlrpc-${VERSION}
+ gzip xmlrpc-${VERSION}.tar
+ zip -r xmlrpc-${VERSION}.zip xmlrpc-${VERSION}
+
+doc:
+ cd doc && $(MAKE) doc
+
+clean:
+ rm -rf xmlrpc-${VERSION} xmlrpc-${VERSION}.zip xmlrpc-${VERSION}.tar.gz
+ cd doc && $(MAKE) clean
diff --git a/xmlrpc-3.0/NEWS b/xmlrpc-3.0/NEWS
new file mode 100644
index 0000000..f0f761f
--- /dev/null
+++ b/xmlrpc-3.0/NEWS
@@ -0,0 +1,333 @@
+XML-RPC for PHP version 3.0.0 beta - 2009/09/05
+
+This is the first release of the library to only support PHP 5.
+Some legacy code has been removed, and support for features such as exceptions
+and dateTime objects introduced.
+
+The "beta" tag is meant to indicate the fact that the refactoring has been more widespread
+than in precedent releases and that more changes are likely to be introduced with time -
+the library is still considered to be production quality.
+
+* improved: removed all usage of php functions deprecated in php 5.3, usage of assign-by-ref when creating new objects etc...
+* improved: add support for the tag used by the apache library, both in input and output
+* improved: add support for dateTime objects in both in php_xmlrpc_encode and as parameter for constructor of xmlrpcval
+* improved: add support for timestamps as parameter for constructor of xmlrpcval
+* improved: add option 'dates_as_objects' to php_xmlrpc_decode to return dateTime objects for xmlrpc datetimes
+* improved: add new method SetCurlOptions to xmrlpc_client to allow extra flexibility in tweaking http config, such as explicitly binding to an ip address
+* improved: add new method SetUserAgent to xmrlpc_client to to allow having different user-agent http headers
+* improved: add a new member variable in server class to allow fine-tuning of the encoding of returned values when the server is in 'phpvals' mode
+* improved: allow servers in 'xmlrpcvals' mode to also register plain php functions by defining them in the dispatch map with an added option
+* improved: catch exceptions thrown during execution of php functions exposed as methods by the server
+* fixed: bad encoding if same object is encoded twice using php_xmlrpc_encode
+
+
+XML-RPC for PHP version 2.2.2 - 2009/03/16
+
+This release corrects all bugs that have been reported and sucesfully reproduced since
+version 2.2.1.
+Regardless of the intimidating message about dropping PHP 4 support, it still does
+support that ancient, broken and insecure platform.
+
+* fixed: php warning when receiving 'false' in a bool value
+* fixed: improve robustness of the debugger when parsing weird results from non-compliant servers
+* fixed: format floating point values using the correct decimal separator even when php locale is set to one that uses comma
+* fixed: use feof() to test if socket connections are to be closed instead of the number of bytes read (rare bug when communicating with some servers)
+* fixed: be more tolerant in detection of charset in http headers
+* fixed: fix encoding of UTF8 chars outside of the BMP plane
+* fixed: fix detection of zlib.output_compression
+* improved: allow the add_to_map server method to add docs for single params too
+* improved: added the possibility to wrap for exposure as xmlrpc methods plain php class methods, object methods and even whole classes
+
+
+XML-RPC for PHP version 2.2.1 - 2008/03/06
+
+This release corrects all bugs that have been reported and sucesfully reproduced.
+It is the last release of the library that will support PHP 4.
+
+* fixed: work aroung bug in php 5.2.2 which broke support of HTTP_RAW_POST_DATA
+* fixed: is_dir parameter of setCaCertificate() method is reversed
+* fixed: a php warning in xmlrpc_client creator method
+* fixed: parsing of '1e+1' as valid float
+* fixed: allow errorlevel 3 to work when prev. error handler was a static method
+* fixed: usage of client::setcookie() for multiple cookies in non-ssl mode
+* improved: support for CP1252 charset is not part or the library but almost possible
+* improved: more info when curl is enabled and debug mode is on
+
+
+XML-RPC for PHP version 2.2 - 2007/02/25
+
+This release corrects a couple of bugs and adds a few minor features.
+
+* fixed: debugger errors on php installs with magic_quotes_gpc on
+* fixed: support for https connections via proxy
+* fixed: wrap_xmlrpc_method() generated code failed to properly encode php objects
+* improved: slightly faster encoding of data which is internally UTF-8
+* improved: debugger always generates a 'null' id for jsonrpc if user omits it
+* new: debugger can take advantage of a graphical value builder
+ (it has to be downloaded separately, as part of jsxmlrpc package)
+* new: support for the xmlrpc extension
+* new: server support for the system.getCapabilities xmlrpc extension
+* new: wrap_xmlrpc_method() accepts two new options: debug and return_on_fault
+
+
+XML-RPC for PHP version 2.1 - 2006/08/28
+
+This release corrects quite a few bugs and adds some interesting new features.
+There is a minor security enhancement and overall speedup too.
+
+It has been tested with PHP 4.0.5 up to 4.4.4 and 5.1.5.
+Please note that 404pl1 is NOT supported, and has not been since 2.0.
+
+*** PLASE READ CAREFULLY BELOW ***
+
+CHANGES THAT MIGHT AFFECT DEPLOYED APPLICATIONS:
+
+The wrap_php_function and wrap_xmlrpc_method functions have been moved out of
+the base library file xmlrpc.inc into a file of their own: xmlrpc_wrappers.inc.
+You will have to include() / require() it in your scripts if you have been using
+those functions.
+
+For increased security, the automatic rebuilding of php object instances out of
+received xmlrpc structs in wrap_xmlrpc_method() has been disabled (but it can be
+optionally reenabled).
+
+The constructor of xmlrpcval() values has seen major changes, and it will not
+throw a php warning anymore when invoked using an unknown xmlrpc type: the
+error will only be written to php error log. Also new xmlrpcval('true', 'boolean')
+is not supported anymore.
+
+MAJOR IMPROVEMENTS:
+
+The new function php_xmlrpc_decode_xml() will take the xml representation of
+either an xmlrpc request, response or single value and return the corresponding
+php-xmlrpc object instance.
+
+Both wrap_php_function() and wrap_xmlrpc_method() functions accept many more
+options to fine tune their behaviour, including one to return the php code to
+be saved and later used as standalone php script.
+
+A new function wrap_xmlrpc_server() has been added, to wrap all (or some) of the
+methods exposed by a remote xmlrpc server into a php class.
+
+Lib internals have been modified to provide better support for grafting extra
+functionality on top of it. Stay tuned for future releases of the EXTRAS package.
+
+Last but not least a new file has been added: verify_compat.php, to help users
+diagnose the level of compliance of the current php install with the library.
+
+CHANGELOG IN DETAIL:
+
+* fixed bug 1311927: client not playing nice with some proxy/firewall on ports != 80
+* fixed bug 1334340: all ereg_ functions have been replaced with corresponding preg_
+* fixed bug: wrong handling of 'deflate' http encoding, both server and client side
+* fixed bug: sending compressed responses when php output compression is enabled was not working
+* fixed bug: addarray() and addstruct() where not returning 1 when adding data to already initialized values
+* fixed bug: non-ascii chars used in struct element names where not being encoded correctly
+* restored compatibility with php 4.0.5 (for those poor souls still stuck on it)
+* server->service() now returns either the payload or xmlrpcresp instance
+* server->add_to_map() now accepts methods with no param definitions
+* added new function: php_xmlrpc_decode_xml()
+* added new function: wrap_xmlrpc_server()
+* major improvements and security enhancements to wrap_php_function() and wrap_xmlrpc_method()
+* documentation for single parameters of exposed methods can be added to the dispatch map
+ (and turned into html docs in conjunction with a future release of the extras package)
+* full response payload is saved into xmlrpcresp object for further debugging
+* stricter parsing of incmoing xmlrpc messages: two more invalid cases are now detected
+ (double data element inside array and struct/array after scalar inside value element)
+* debugger can now generate code that wraps a remote method into php function (works for jsonrpc, too)
+* debugger has better support for being activated via a single GET call (for integration into other tools?)
+* more logging of errors in a lot of situations
+* javadoc documentation of lib files almost complete
+* the usual amount of new testcases in the testsuite
+* many performance tweaks and code cleanups
+* added foundation for emulating the API of the xmlrpc extension (extras package needed)
+
+
+XML-RPC for PHP version 2.0 - 2006/04/24
+
+I'm pleased to announce XML-RPC for PHP version 2.0, final.
+
+With respect to the last release candidate, this release corrects a few small
+bugs and adds a couple of new features: more authentication options (digest and
+ntlm for servers, ntlm for proxies, and some https custom certificates stuff);
+all the examples have been reviewed and some demo files added,
+including a ready-made xmlrpc proxy (useful e.g. for ajax calls, when the xmlrpc
+client is a browser); the server logs more warning messages for incorrect situations;
+both client and server are more tolerant of commonly-found mistakes.
+The debugger has been upgraded to reflect the new client capabilities.
+
+In greater detail:
+
+* fixed bug: method xmlrpcval::structmemexists($value) would not work
+* fixed bug: wrap_xmlrpc_method would fail if invoked with a client object that
+ has return_type=phpvals
+* fixed bug: in case of call to client::multicall without fallback and server error
+* fixed bug: recursive serialization of xmlrpcvals loosing specified UTF8 charset
+* fixed bug: serializing to ISO-8859-1 with php 5 would raise an error if non-ascii
+ chars where found when decoding
+* new: client can use NTLM and Digest authentication methods for https and http 1.1
+ connections; authentication to proxy can be set to NTLM, too
+* new: server tolerates user functions returning a single xmlrpcval object instead
+ of an xmlrpcresp
+* new: server does more checks for presence and correct return type of user
+ coded method handling functions, and logs inconsistencies to php error log
+* new: client method SetCaCertificate($cert, $is_dir) to validate server against
+* new: both server and client tolerate receiving 'true' and 'false' for bool values
+ (which btw are not valid according to the xmlrpc spec)
+
+
+XML-RPC for PHP version 2.0RC3 - 2006/01/22
+
+This release corrects a few bugs and adds some interesting new features.
+It has been tested with PHP up to 4.4.2 and 5.1.2.
+
+* fixed bug: server not recognizing clients that declare support for http compression
+* fixed bug: serialization of new xmlrpcval (8, 'string') when internal encoding
+ set to UTF-8
+* fixed bug: serialization of new xmlrpcval ('hello', 'int') would produce
+ invalid xml-rpc
+* new: let the server accept 'class::method' syntax in the dispatch map
+* new: php_xmlrpc_decode() can decode xmlrpcmessage objects
+* new: both client and server can specify a charset to be used for serializing
+ values instead of the default 'US-ASCII+xml-entities-for-other-characters'.
+ Values allowed: ISO-8859-1 and UTF-8
+* new: the server object can register 'plain' php functions instead of functions
+ that accept a single parameter of type xmlrpcmsg. Faster, uses less memory
+ (but comes with minor drawbacks as well, read the manual for more details)
+* new: client::setDebug(2) can be used to have the request payload printed to
+ screen before being sent
+* new: server::service($data) lets user parse data other than POST body, for
+ easier testing / subclassing
+* changed: framework-generated debug messages are sent back by the server base64
+ encoded, to avoid any charset/xml compatibility problem
+* other minor fixes
+
+The usual refactoring of a lot of (private) methods has taken place, with new
+parameters added to some functions.
+Javadoc documentation has been improved a lot.
+The HTML documentation has been shuffled around a bit, hoping to give it a more
+logical organization.
+
+The experimental support for the JSON protocol has been removed, and will be
+packaged as a separate download with some extra very interesting stuff (human
+readable auto-generated documentation, anyone?).
+
+
+XML-RPC for PHP version 2.0RC2 - 2005/11/22
+
+This release corrects a few bugs and adds basically one new method for better
+HTTPS support:
+
+ * fixed two bugs that prevented xmlrpc calls to take place over https
+ * fixed two bugs that prevented proper recognition of xml character set
+ when it was declared inside the xml prologue
+ * added xmlrpc_client::setKey($key, $keypass) method, to allow using client
+ side certificates for https connections
+ * fixed bug that prevented proper serialization of string xmlrpcvals when
+ $xmlrpc_internalencoding was set to UTF-8
+ * fixed bug in xmlrpc_server::echoInput() (and marked method as deprecated)
+ * correctly set cookies/http headers into xmlrpcresp objects even when the
+ sned() method call fails for some reason
+ * added a benchmark file in the testsuite directory
+
+A couple of (private/protected) methods have been refactored, as well as a
+couple of extra parameters added to some (private) functions - this has no
+impact on the public API and should be of interest primarily to people extending
+/ subclassing the lib.
+
+There is also new, PARTIAL support for the JSON-RPC protocol, implemented in
+two files in the extras dir (more info about json-rpc at http://json-rpc.org)
+
+
+XML-RPC for PHP version 2.0RC1 - 2005/10/03
+
+I'm pleased to announce XML-RPC for PHP version 2.0, release candidate 1.
+
+This release introduces so many new features it is almost impossible to list them
+here, making the library finally on pair with, if not more advanced than, any other
+similar offer (e.g. the PEAR XMLRPC package or the Incutio IXR library).
+No, really, trust me.
+
+The minimum supported PHP version is now 4.2 - natively - or 4.0.4pl1 - by usage of
+a couple of compatibility classes (code taken from PEAR php_compat package).
+
+The placement of files and directories in the distribution has been deeply modified,
+in the hope of making it more clear, now that the file count has increased.
+I hope you find it easy.
+
+Support for "advanced" HTTP features such as cookies, proxies and keep-alives has
+been added at last.
+
+It is now much easier to convert between xmlrpcval objects and php values, and
+in fact php_xmlrpc_encode and php_xmlrpc_decode are now the recommended methods
+for all cases, except when encoding base64 data.
+
+Two new (experimental) functions have been added, allowing automagic conversion
+of a php function into an xmlrpc method to be exposed and vice-versa.
+
+PHP objects can be now automatically serialized as xmlrpc struct values and
+correctly deserialized on the other end of the transmission, provided that the
+same class definition is present on both sides and no object members are of
+type resource.
+
+A lot of the existing class methods have been overloaded with extra parameters
+or new functionality, and a few added ex-novo, making usage easier than ever.
+
+A complete debugger solution is included in the distribution. It needs a web server
+to run (a freely available version of the same debugger is accessible online, it
+can be found at http://phpxmlrpc.sourceforge.net).
+
+For a more detailed list of changes, please read carefully chapter 2 of the
+included documentation, or, even better, take a look at the source code, which
+is commented in javadoc style quite a bit.
+
+
+XML-RPC for PHP version 1.2 - 2005/08/14
+
+This removes all use of eval(), which is a potential security problem.
+All users are encouraged to upgrade as soon as possible.
+As of this release we are no longer php3-compatible.
+
+
+XML-RPC for PHP version 1.1.1 - 2005/06/30
+
+This is a security vulnerability fix release.
+All users are invited to upgrade as soon as possible.
+
+
+XML-RPC for PHP version 1.1 - 2005/05/03
+
+I'm pleased to announce XML-RPC for PHP version 1.1
+It's taken two years to get to the this point, but here we are, finally.
+
+This is a bugfix and maintenance release. No major new features have been added.
+All known bugs have been ironed out, unless fixing would have meant breaking
+the API.
+The code has been tested with PHP 3, 4 and 5, even tough PHP 4 is the main
+development platform (and some warnings will be emitted when runnning PHP5).
+
+Notheworthy changes include:
+
+ * do not clash any more with the EPI xmlrpc extension bundled with PHP 4 and 5
+ * fixed the unicode/charset problems that have been plaguing the lib for years
+ * proper parsing of int and float values prepended with zeroes or the '+' char
+ * accept float values in exponential notation
+ * configurable http user-agent string
+ * use the same timeout on client socket reads as used for connecting
+ * more explicative error messages in xmlrpcresponse in many cases
+ * much more tolerant parsing of malformed http responses from xmlrpc servers
+ * fixed memleak that prevented the client to be used in never-ending scripts
+ * parse bigger xmlrpc messages without crashing (1MB in size or more)
+ * be tolerant to xmlrpc responses generated on public servers that add
+ javascript advertising at the end of hosted content
+ * the lib generates quite a few less PHP warnings during standard operation
+
+This is the last release that will support PHP 3.
+The next release will include better support for PHP 5 and (possibly) a slew of
+new features.
+
+The changelog is available at:
+http://cvs.sourceforge.net/viewcvs.py/phpxmlrpc/xmlrpc/ChangeLog?view=markup
+
+Please report bugs to the XML-RPC PHP mailing list or to the sourceforge project
+pages at http://sourceforge.net/projects/phpxmlrpc/
diff --git a/xmlrpc-3.0/README b/xmlrpc-3.0/README
new file mode 100644
index 0000000..e757a5d
--- /dev/null
+++ b/xmlrpc-3.0/README
@@ -0,0 +1,13 @@
+NAME: XMLRPC FOR PHP
+
+DESCRIPTION: A php library for building xmlrpc clients and servers
+
+
+
+HTML documentation can be found in the doc/ directory.
+
+Recent changes in the ChangeLog
+
+Use of this software is subject to the terms in doc/index.html
+
+The passphrase for the rsakey.pem certificate is 'test'.
diff --git a/xmlrpc-3.0/debugger/action.php b/xmlrpc-3.0/debugger/action.php
new file mode 100644
index 0000000..869fff7
--- /dev/null
+++ b/xmlrpc-3.0/debugger/action.php
@@ -0,0 +1,527 @@
+
+
+
+
+ XMLRPC Debugger
+
+
+
+
+ 1)
+ $pport = $pproxy[1];
+ else
+ $pport = 8080;
+ $client->setProxy($pproxy[0], $pport, $proxyuser, $proxypwd);
+ }
+
+ if ($protocol == 2)
+ {
+ $client->setSSLVerifyPeer($verifypeer);
+ $client->setSSLVerifyHost($verifyhost);
+ if ($cainfo)
+ {
+ $client->setCaCertificate($cainfo);
+ }
+ $httpprotocol = 'https';
+ }
+ else if ($protocol == 1)
+ $httpprotocol = 'http11';
+ else
+ $httpprotocol = 'http';
+
+ if ($username)
+ $client->setCredentials($username, $password, $authtype);
+
+ $client->setDebug($debug);
+
+ switch ($requestcompression) {
+ case 0:
+ $client->request_compression = '';
+ break;
+ case 1:
+ $client->request_compression = 'gzip';
+ break;
+ case 2:
+ $client->request_compression = 'deflate';
+ break;
+ }
+
+ switch ($responsecompression) {
+ case 0:
+ $client->accepted_compression = '';
+ break;
+ case 1:
+ $client->accepted_compression = array('gzip');
+ break;
+ case 2:
+ $client->accepted_compression = array('deflate');
+ break;
+ case 3:
+ $client->accepted_compression = array('gzip', 'deflate');
+ break;
+ }
+
+ $cookies = explode(',', $clientcookies);
+ foreach ($cookies as $cookie)
+ {
+ if (strpos($cookie, '='))
+ {
+ $cookie = explode('=', $cookie);
+ $client->setCookie(trim($cookie[0]), trim(@$cookie[1]));
+ }
+ }
+
+ $msg = array();
+ switch ($action) {
+
+ case 'wrap':
+ @include('xmlrpc_wrappers.inc');
+ if (!function_exists('build_remote_method_wrapper_code'))
+ {
+ die('Error: to enable creation of method stubs the xmlrpc_wrappers.inc file is needed');
+ }
+ // fall thru intentionally
+ case 'describe':
+ case 'wrap':
+ $msg[0] = new $msgclass('system.methodHelp', null, $id);
+ $msg[0]->addparam(new xmlrpcval($method));
+ $msg[1] = new $msgclass('system.methodSignature', null, $id+1);
+ $msg[1]->addparam(new xmlrpcval($method));
+ $actionname = 'Description of method "'.$method.'"';
+ break;
+ case 'list':
+ $msg[0] = new $msgclass('system.listMethods', null, $id);
+ $actionname = 'List of available methods';
+ break;
+ case 'execute':
+ if (!payload_is_safe($payload))
+ die("Tsk tsk tsk, please stop it or I will have to call in the cops!");
+ $msg[0] = new $msgclass($method, null, $id);
+ // hack! build xml payload by hand
+ if ($wstype == 1)
+ {
+ $msg[0]->payload = "{\n".
+ '"method": "' . $method . "\",\n\"params\": [" .
+ $payload .
+ "\n],\n\"id\": ";
+ // fix: if user gave an empty string, use NULL, or we'll break json syntax
+ if ($id == "")
+ {
+ $msg[0]->payload .= "null\n}";
+ }
+ else
+ {
+ if (is_numeric($id) || $id == 'false' || $id == 'true' || $id == 'null')
+ {
+ $msg[0]->payload .= "$id\n}";
+ }
+ else
+ {
+ $msg[0]->payload .= "\"$id\"\n}";
+ }
+ }
+ }
+ else
+ $msg[0]->payload = $msg[0]->xml_header() .
+ '' . $method . "\n" .
+ $payload .
+ "\n" . $msg[0]->xml_footer();
+ $actionname = 'Execution of method '.$method;
+ break;
+ default: // give a warning
+ $actionname = '[ERROR: unknown action] "'.$action.'"';
+ }
+
+ // Before calling execute, echo out brief description of action taken + date and time ???
+ // this gives good user feedback for long-running methods...
+ echo '
'.htmlspecialchars($actionname).' on server '.htmlspecialchars($server)." ...
";
+ //}
+ //else
+ //{
+ // echo 'Error while building php code stub...';
+ }
+
+ break;
+
+ case 'execute':
+ echo '
Response:
'.htmlspecialchars($response->serialize()).'
';
+ break;
+
+ default: // give a warning
+ }
+ } // if !$response->faultCode()
+ } // if $response
+ }
+ else
+ {
+ // no action taken yet: give some instructions on debugger usage
+?>
+
+
Instructions on usage of the debugger:
+
+
Run a 'list available methods' action against desired server
+
If list of methods appears, click on 'describe method' for desired method
+
To run method: click on 'load method synopsis' for desired method. This will load a skeleton for method call parameters in the form above. Complete all xmlrpc values with appropriate data and click 'Execute'
+
+You will need to enable the CURL extension to use the HTTPS and HTTP 1.1 transports
all usernames and passwords entered on the above form will be written to the web server logs of this server. Use with care.
+
+
Changelog
+
+
2007-02-20: add visual editor for method payload; allow strings, bools as jsonrpc msg id
+
2006-06-26: support building php code stub for calling remote methods
+
2006-05-25: better support for long running queries; check for no-curl installs
+
2006-05-02: added support for JSON-RPC. Note that many interesting json-rpc features are not implemented yet, such as notifications or multicall.
+
2006-04-22: added option for setting custom CA certs to verify peer with in SSLmode
+
2006-03-05: added option for setting Basic/Digest/NTLM auth type
+
2006-01-18: added option echoing to screen xmlrpc request before sending it ('More' debug)
+
2005-10-01: added option for setting cookies to be sent to server
+
2005-08-07: added switches for compression of requests and responses and http 1.1
+
2005-06-27: fixed possible security breach in parsing malformed xml
+
2005-06-24: fixed error with calling methods having parameters...
+
+
+
+
diff --git a/xmlrpc-3.0/debugger/common.php b/xmlrpc-3.0/debugger/common.php
new file mode 100644
index 0000000..4abcfcf
--- /dev/null
+++ b/xmlrpc-3.0/debugger/common.php
@@ -0,0 +1,135 @@
+
\ No newline at end of file
diff --git a/xmlrpc-3.0/debugger/controller.php b/xmlrpc-3.0/debugger/controller.php
new file mode 100644
index 0000000..6a32dd2
--- /dev/null
+++ b/xmlrpc-3.0/debugger/controller.php
@@ -0,0 +1,321 @@
+ 100%...
+ * @todo add support for more options, such as ntlm auth to proxy, or request charset encoding
+ *
+ * @todo parse content of payload textarea to be fed to visual editor
+ * @todo add http no-cache headers
+ **/
+
+ include(getcwd().'/common.php');
+ if ($action == '')
+ $action = 'list';
+
+ // relative path to the visual xmlrpc editing dialog
+ $editorpath = '../../javascript/';
+?>
+
+
+
+XMLRPC Debugger
+
+
+
+
+
+
+
+
+
+
XMLRPC
+/JSONRPC Debugger (based on the PHP-XMLRPC library)
+
+
+
\ No newline at end of file
diff --git a/xmlrpc-3.0/debugger/index.php b/xmlrpc-3.0/debugger/index.php
new file mode 100644
index 0000000..004b21a
--- /dev/null
+++ b/xmlrpc-3.0/debugger/index.php
@@ -0,0 +1,21 @@
+
+
+
+
+XMLRPC Debugger
+
+
+
\ No newline at end of file
diff --git a/xmlrpc-3.0/demo/client/agesort.php b/xmlrpc-3.0/demo/client/agesort.php
new file mode 100644
index 0000000..62a35cc
--- /dev/null
+++ b/xmlrpc-3.0/demo/client/agesort.php
@@ -0,0 +1 @@
+xmlrpc
Agesort demo
Send an array of 'name' => 'age' pairs to the server that will send it back sorted.
The source code demonstrates basic lib usage, including handling of xmlrpc arrays and structs
24, "Edd" => 45, "Joe" => 37, "Fred" => 27);reset($inAr);print "This is the input data:
";// create parameters from the input array: an xmlrpc array of xmlrpc structs$p=array();foreach($inAr as $key => $val) { $p[]=new xmlrpcval(array("name" => new xmlrpcval($key), "age" => new xmlrpcval($val, "int")), "struct");}$v=new xmlrpcval($p, "array");print "Encoded into xmlrpc format it looks like this:
\n" . htmlentities($v->serialize()). "
\n";// create client and message objects$f=new xmlrpcmsg('examples.sortByAge', array($v));$c=new xmlrpc_client("/server.php", "phpxmlrpc.sourceforge.net", 80);// set maximum debug level, to have the complete communication printed to screen$c->setDebug(2);// send requestprint "Now sending request (detailed debug info follows)";$r=&$c->send($f);// check response for errors, and take appropriate actionif (!$r->faultCode()) { print "The server gave me these results:
"; $v=$r->value(); $max=$v->arraysize(); for($i=0; $i<$max; $i++) { $rec=$v->arraymem($i); $n=$rec->structmem("name"); $a=$rec->structmem("age"); print htmlspecialchars($n->scalarval()) . ", " . htmlspecialchars($a->scalarval()) . "\n"; } print "For nerds: I got this value back