Services

Re:

  1. freelance writer

Re:

  1. freelance writer

Fix for XML RPC example for Drupal 6.x Services

  1. <?php
  2.  
  3. /**
  4.  * Function for generating a random string, used for
  5.  * generating a token for the XML-RPC session
  6.  */
  7. function getUniqueCode($length = "") {
  8.   $code = md5(uniqid(rand(), true));
  9.  

user.save with Drupal Services 6.x-2.2

  1. /*
  2.  * Now let's retrieve our user to change
  3.  */
  4. // set vars for this connection
  5. $nonce = getUniqueCode("10");
  6. $method_name = 'user.load';
  7. $timestamp = (string) strtotime("now");
  8. $required_args

Fix for XML RPC example for Drupal 6.x Services

  1. <?php
  2.  
  3. /**
  4.  * Function for generating a random string, used for
  5.  * generating a token for the XML-RPC session
  6.  */
  7. function getUniqueCode($length = "") {
  8.   $code = md5(uniqid(rand(), true));
  9.  

XML RPC example for Drupal 6.x Services

  1. <?php
  2.  
  3. /**
  4.  * Function for generating a random string, used for
  5.  * generating a token for the XML-RPC session
  6.  */
  7. function getUniqueCode($length = "") {
  8.   $code = md5(uniqid(rand(), true));
  9.  

services module examples

  1. /**
  2.  * service definition
  3.  */
  4.  
  5. function cws_service_service() {
  6. return array(
  7.     // cws.euid_from_email
  8.     array(
  9.       '#method'   => 'cws.euid_from_email',
  10.       '#callback' => 'cws_servi

long polling service

  1. $counter = 0;
  2. while (!$view->result) {
  3.   $view = views_get_view($view_name);
  4.  
  5.   // Put all arguments and then execute
  6.   $view->set_arguments($args, FALSE);
  7.   $view->set_offset($offset);

Fix for Services API key use

  1. Using Services API Keys

Services API key use

  1. Using Services API Keys
Syndicate content