
Untitled
By: a guest on
May 6th, 2012 | syntax:
PHP | size: 0.23 KB | hits: 18 | expires: Never
public function is_url(){
$url = $this->input->post('url');
$headers = get_headers($url);
$headers = preg_match('/^HTTP\/\d\.\d\s+(200|301|302)/', $headers[0]);
return $headers == 1 ? true : false;
}