body = $body; if (isset($headers)) $this->headers = $headers; } public function rewriteHashbangFragment($url) { return $url; } public function getRedirectURLfromHTML($url, $html) { return false; } public function getMetaRefreshURL($url, $html) { return false; } public function getUglyURL($url, $html) { return false; } public function removeFragment($url) { return $url; } public function rewriteUrls($url) { return $url; } public function enableDebug($bool=true) { return; } public function minimiseMemoryUse($bool = true) { return; } public function setMaxParallelRequests($max) { return; } public function validateUrl($url) { $url = filter_var($url, FILTER_SANITIZE_URL); $test = filter_var($url, FILTER_VALIDATE_URL); // deal with bug http://bugs.php.net/51192 (present in PHP 5.2.13 and PHP 5.3.2) if ($test === false) { $test = filter_var(strtr($url, '-', '_'), FILTER_VALIDATE_URL); } if ($test !== false && $test !== null && preg_match('!^https?://!', $url)) { return $url; } else { return false; } } public function fetchAll(array $urls) { return; } // fetch all URLs without following redirects public function fetchAllOnce(array $urls, $isRedirect=false) { return; } public function get($url, $remove=false, $gzdecode=true) { return array( 'body' => $this->body, 'headers' => $this->headers, 'status_code' => 200, 'effective_url' => $url ); } public function parallelSupport() { return false; } }