Initial commit

This commit is contained in:
2014-07-27 12:37:21 +02:00
commit 00a5d742ca
2 changed files with 48 additions and 0 deletions

15
check_smhiwarn.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
$ok = 0;
$warning = 1;
$critical = 2;
$unknown = 3;
$data = file_get_contents("smhi_alla_varningar.xml");
preg_match("/(Norrbottens län kustland)(?:: )(?:Varning klass )([1-3]+)(?:,\s)([-a-z0-9åäö.,&\s]*)/i",
$data, $matches);
print "Area: $matches[1]\n";
print "Class: $matches[2]\n";
print "Msg: $matches[3]\n";
?>