| 6 openid.inc | _openid_link_href($rel, $html) |
| 7 openid.inc | _openid_link_href($rel, $html) |
| 8 openid.inc | _openid_link_href($rel, $html) |
Pull the href attribute out of an html link element.
1 call to _openid_link_href()
File
- modules/
openid/ openid.inc, line 197 - OpenID utility functions.
Code
function _openid_link_href($rel, $html) {
$rel = preg_quote($rel);
preg_match('|<link\s+rel=["\'](.*)' . $rel . '(.*)["\'](.*)/?>|iUs', $html, $matches);
if (isset($matches[3])) {
preg_match('|href=["\']([^"]+)["\']|iU', $matches[3], $href);
return trim($href[1]);
}
return FALSE;
}
Login or register to post comments