I still didn't get from the docs how can I access, using services, data from one site to another.
Comments
amitaibu’s picture
Ok, took me some time but I found the answer. The key is in drupal_http_request(),
amitaibu’s picture
Status: Active » Fixed
amitaibu’s picture
Title: How to access a service on another site » Syntax to access a service via POST
Status: Fixed » Active
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'));
amitaibu’s picture
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);
amitaibu’s picture
Status: Active » Closed (fixed)
Syntax should use xmlrpc()
$result = xmlrpc('http://example.com', 'node.load', 1, array());
amitaibu’s picture
Title: Syntax to access a service via POST » Syntax to access a service via xmlrpc
. (double posting)
Comment #1
amitaibuI found this module http://drupal.org/project/get_server. Apart if this, is there another way?