Lines Matching full:url
49 * Return whether a URL can be fetched. Returns false if the URL
55 function canFetchURL($url) argument
57 if ($this->isHTTPS($url) && !$this->supportsSSL()) {
58 Auth_OpenID::log("HTTPS URL unsupported fetching %s",
59 $url);
63 if (!$this->allowedURL($url)) {
64 Auth_OpenID::log("URL fetching not allowed for '%s'",
65 $url);
73 * Return whether a URL should be allowed. Override this method to
76 * By default, will attempt to fetch any http or https URL.
78 function allowedURL($url) argument
80 return $this->URLHasAllowedScheme($url);
96 * Is this an https URL?
100 function isHTTPS($url) argument
102 return (bool)preg_match('/^https:\/\//i', $url);
106 * Is this an http or https URL?
110 function URLHasAllowedScheme($url) argument
112 return (bool)preg_match('/^https?:\/\//i', $url);
118 function _findRedirect($headers, $url) argument
127 $hpos = strpos($url, "://");
128 $prt = substr($url, 0, $hpos+3);
129 $url = substr($url, $hpos+3);
132 $fspos = strpos($url, "/");
133 if ($fspos) $loc = $prt.substr($url, 0, $fspos).$loc;
134 else $loc = $prt.$url.$loc;
139 $xpos = strpos($url, "/");
141 $apos = strpos($url, "?");
143 $apos = strpos($url, "&");
145 $pp .= substr($url, 0, $xpos+1);
146 $url = substr($url, $xpos+1);
158 * Fetches the specified URL using optional extra headers and
161 * @param string $url The URL to be fetched.
164 * @return mixed $result An array of ($code, $url, $headers,
165 * $body) if the URL could be fetched; null if the URL does not
169 function get($url, $headers = null) argument