$hash = 'test';
if($_GET['hash'] == $hash):
//process
else:
//error
endif;

geçerli URL:
test.php?hash=test

geçersiz URL:
test.php?hash=test2