First commit
This commit is contained in:
parent
05c2c1da47
commit
4e32c26f45
1 changed files with 10 additions and 0 deletions
10
web/lib/gethttpcode.php
Normal file
10
web/lib/gethttpcode.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
function gethttpcode(&$headers) {
|
||||
if (is_array($headers) && preg_match('#^\S+ (\d+) \S+.*$#',$headers[0],$matches)===1)
|
||||
return $matches[1]+0;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in a new issue