find out more about us, have a read of our blog, or check out our portfolio? You\'re more than welcome to drop us a line, too.'; // send email notifying admin of broken link - have to use native function // as the CI super-object is not yet instantiated :( $to = 'errors@your.domain'; $subject = 'Simian Studios - Broken inbound link'; $email_text = 'Broken link at: ' . $_SERVER['HTTP_REFERER']; $headers = 'From: system@your.domain' . "\r\n" . 'Reply-To: system@your.domain' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $email_text, $headers); } else // no referer, so probably came direct { $message[0] .= 'It looks like you came directly to this page, either by typing the URL or from a bookmark. Please make sure the address you have typed or bookmarked is correct - if it is, then unfortunately the page is no longer available.'; $message[] = 'But all is not lost - why not find out more about us, have a read of our blog, or check out our portfolio? You\'re more than welcome to drop us a line, too.'; } log_message('error', '404 Page Not Found --> '.$page); echo $this->show_error($heading, $message, 'error_404', 404); exit; } }