Skip to content

Instantly share code, notes, and snippets.

@greg606
Created July 18, 2011 09:21
Show Gist options
  • Save greg606/1088988 to your computer and use it in GitHub Desktop.
Save greg606/1088988 to your computer and use it in GitHub Desktop.
<?php
preg_match('@^(?:http://)?([^/]+)@i', $_SERVER['HTTP_HOST'], $matches);
$host = $matches[1];
if($host != 'localhost')
die('Jakiś komunikat albo nie');
?>
Strona....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment