Pull the content attribute out of an X-XRDS-Location meta http-equiv element.
function _openid_meta_httpequiv($html) {
$html_dom = new DOMDocument();
if (@$html_dom
->loadHTML($html)) {
$html_element = simplexml_import_dom($html_dom);
if (isset($html_element->head->meta)) {
foreach ($html_element->head->meta as $meta) {
// The http-equiv attribute is case-insensitive.
if (strtolower(trim($meta['http-equiv'])) == 'x-xrds-location') {
return trim($meta['content']);
}
}
}
}
return FALSE;
}