I still didn't get from the docs how can I access, using services, data from one site to another.
I found this module http://drupal.org/project/get_server. Apart if this, is there another way?
Ok, took me some time but I found the answer. The key is in drupal_http_request(),
What is the correct syntax, the following doesn't work for me:
$data = drupal_http_request('http://localhost/d5/services/xmlrpc', array(), 'POST', array('method' => 'node.load', 'nid' => '1'));
I tried this, still I get parser error:
$request = http_build_query(array('method' => 'node.load', 'nid' => '1')); $data = drupal_http_request('http://localhost/d5/services/xmlrpc', array(), 'POST', $request); dpm($data);
Syntax should use xmlrpc()
$result = xmlrpc('http://example.com', 'node.load', 1, array());
. (double posting)
Comments
Comment #1
amitaibuI found this module http://drupal.org/project/get_server. Apart if this, is there another way?
Comment #2
amitaibuOk, took me some time but I found the answer. The key is in drupal_http_request(),
Comment #3
amitaibuComment #4
amitaibuWhat is the correct syntax, the following doesn't work for me:
Comment #5
amitaibuI tried this, still I get parser error:
Comment #6
amitaibuSyntax should use xmlrpc()
$result = xmlrpc('http://example.com', 'node.load', 1, array());Comment #7
amitaibu. (double posting)