| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: autotagging_calais.module,v 1.1 2009/07/06 19:06:34 acstewart Exp $ |
| 3 |
|
|
| 4 |
/* |
/* |
| 5 |
* @file autotagging_calais.module |
* @file autotagging_calais.module |
| 42 |
} |
} |
| 43 |
$response = drupal_http_request($url . $alldata, array(), 'POST'); |
$response = drupal_http_request($url . $alldata, array(), 'POST'); |
| 44 |
$xml = $response->data; |
$xml = $response->data; |
| 45 |
|
if ($response->code != 200) { |
| 46 |
|
watchdog('autotagging_calais', 'Received response code '. $response->code .' from OpenCalais', WATCHDOG_SEVERE); |
| 47 |
|
return array(); |
| 48 |
|
} |
| 49 |
$doc = DOMDocument::loadXML($xml); |
$doc = DOMDocument::loadXML($xml); |
| 50 |
$xp = new DOMXPath($doc); |
$xp = new DOMXPath($doc); |
| 51 |
$xp->registerNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); |
$xp->registerNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); |