title: How do I use drupal services node.save from a non drupal site?
body: <p>I'm trying to create a node in a drupal site from a non-drupal site, but I can't for the life of me get it to work.</p>
  
  <p>This is the code I've constructed from googling around...</p>
  
  <pre><code>$domain = 'http://mydomain.com';
  $operation = 'node.save';
  $api_key = 'my api key';
  $timestamp = (string) time();
  $nonce = substr(md5(uniqid('s', true)), 0, 10);
  $hash = hash_hmac('sha256', $timestamp .';'.$domain .';'. $nonce .';'.$operation, $api_key);
  
  $node_data = array(
  'type'        =&gt; 'story',
  'title'       =&gt; 'test story title',
  'body'        =&gt; 'test story text'
  );
  
  $send_data = array(
    'method' =&gt; $operation,
    'args' =&gt; array(
        'hash'              =&gt; $hash,
        'domain_name'       =&gt; $domain,
        'domain_time_stamp' =&gt; $timestamp,
        'nonce'             =&gt; $nonce,
        'node'              =&gt; serialize($node_data)
    )
  );
  
  $request = xmlrpc_encode_request($operation, $send_data);
  
  $context = stream_context_create(
    array(
      'http' =&gt; array(
        'method' =&gt; "POST",
        'header' =&gt; "Content-Type: text/xml",
        'content' =&gt; $request
      )
    )
  );
  
  $retrieve = file_get_contents($domain .'/services/xmlrpc', false, $context);
  $response = xmlrpc_decode($retrieve);
  
  echo '&lt;pre&gt;'. htmlspecialchars(print_r($response, 1)) .'&lt;/pre&gt;';
  </code></pre>
  
  <p>but alls I get back from the server is: "Missing required arguments: node", and I'ma damn passing that shit through....</p>
  
  <p>I can get a "system.connect" response which makes me feel okay, but thats all i can get. My services settings are to not require a session_id.</p>
  
  <p>Help me stackoverflow... You're my only hope</p>