使用curl功能:
http://php.net/manual/en/book.curl.php
假设您正在使用GET请求连接到RESTful API:
$url = "http://the-api-you-want/?the-args=your-args&another-arg=another-arg"; 
$ch = curl_init(); // start CURL
curl_setopt($ch, CURLOPT_URL, $url); // set your URL
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // get the response as a variable
$json = curl_exec($ch); // connect and get your JSON response 
curl_close($ch);
然后,您可以json_decode在响应中使用PHP ,如果这是您想要做的.
另一种选择是使用Drupal的drupal_http_request功能http://api.drupal.org/api/function/drupal_http_request/6