public function isWebpage($url) {
		$url = filter_var($url, FILTER_VALIDATE_URL);
		if (!strlen($url)) {
			return false;
		}
		
		$c = curl_init(); 
		curl_setopt($c, CURLOPT_URL, $url); 
		curl_setopt($c, CURLOPT_HEADER, 1); // get the header 
		curl_setopt($c, CURLOPT_NOBODY, 1); // and *only* get the header 
		curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); // get the response as a string from curl_exec(), rather than echoing it 
		curl_setopt($c, CURLOPT_FRESH_CONNECT, 1); // don't use a cached version of the url 
		$result = curl_exec($c);
		
		if (!$result) { 
			return false; 
		} 
		
		if (stripos($result, 'Content-type: text/html')) {
//			$svc = new RestfulService($url);
//			$response = $svc->request('', 'GET');
			return true;
		}
		
		return false;
	}
public function isWebpage($url) {
		$url = filter_var($url, FILTER_VALIDATE_URL);
		if (!strlen($url)) {
			return false;
		}
		
		$c = curl_init(); 
		curl_setopt($c, CURLOPT_URL, $url); 
		curl_setopt($c, CURLOPT_HEADER, 1); // get the header 
		curl_setopt($c, CURLOPT_NOBODY, 1); // and *only* get the header 
		curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); // get the response as a string from curl_exec(), rather than echoing it 
		curl_setopt($c, CURLOPT_FRESH_CONNECT, 1); // don't use a cached version of the url 
		$result = curl_exec($c);
		
		if (!$result) { 
			return false; 
		} 
		
		if (stripos($result, 'Content-type: text/html')) {
//			$svc = new RestfulService($url);
//			$response = $svc->request('', 'GET');
			return true;
		}
		
		return false;
	}
public function isWebpage ( $ url ) { $ url = filter_var ( $ url , FILTER_VALIDATE_URL ) ; if ( ! strlen ( $ url ) ) { return false ; } $ c = curl_init ( ) ; curl_setopt ( $ c , CURLOPT_URL , $ url ) ; curl_setopt ( $ c , CURLOPT_HEADER , 1 ) ; // get the header  curl_setopt ( $ c , CURLOPT_NOBODY , 1 ) ; // and *only* get the header  curl_setopt ( $ c , CURLOPT_RETURNTRANSFER , 1 ) ; // get the response as a string from curl_exec(), rather than echoing it  curl_setopt ( $ c , CURLOPT_FRESH_CONNECT , 1 ) ; // don't use a cached version of the url  $ result = curl_exec ( $ c ) ; if ( ! $ result ) { return false ; } if ( stripos ( $ result , 'Content-type: text/html' ) ) { //			$svc = new RestfulService($url); //			$response = $svc->request('', 'GET'); return true ; } return false ; }
Check whether a given URL is actually an html page
Check whether a given URL is actually an html page