Lines Matching full:url
55 * Return whether a URL can be fetched. Returns false if the URL
59 * @param string $url
62 function canFetchURL($url) argument
64 if ($this->isHTTPS($url) && !$this->supportsSSL()) {
65 Auth_OpenID::log("HTTPS URL unsupported fetching %s",
66 $url);
70 if (!$this->allowedURL($url)) {
71 Auth_OpenID::log("URL fetching not allowed for '%s'",
72 $url);
80 * Return whether a URL should be allowed. Override this method to
83 * By default, will attempt to fetch any http or https URL.
85 * @param string $url
88 function allowedURL($url) argument
90 return $this->URLHasAllowedScheme($url);
107 * Is this an https URL?
110 * @param string $url
113 function isHTTPS($url) argument
115 return (bool)preg_match('/^https:\/\//i', $url);
119 * Is this an http or https URL?
122 * @param string $url
125 function URLHasAllowedScheme($url) argument
127 return (bool)preg_match('/^https?:\/\//i', $url);
133 * @param string $url
136 function _findRedirect($headers, $url) argument
145 $hpos = strpos($url, "://");
146 $prt = substr($url, 0, $hpos+3);
147 $url = substr($url, $hpos+3);
150 $fspos = strpos($url, "/");
151 if ($fspos) $loc = $prt.substr($url, 0, $fspos).$loc;
152 else $loc = $prt.$url.$loc;
157 $xpos = strpos($url, "/");
159 $apos = strpos($url, "?");
161 $apos = strpos($url, "&");
163 $pp .= substr($url, 0, $xpos+1);
164 $url = substr($url, $xpos+1);
176 * Fetches the specified URL using optional extra headers and
179 * @param string $url The URL to be fetched.
183 function get($url, $headers = null) argument