Rev 25 | Rev 32 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14 | daniel-mar | 1 | <?php |
2 | daniel-mar | 2 | |
26 | daniel-mar | 3 | /* |
4 | * MAC interpreter for PHP |
||
5 | * Copyright 2017 - 2023 Daniel Marschall, ViaThinkSoft |
||
6 | * Version 2023-07-11 |
||
7 | * |
||
8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
||
9 | * you may not use this file except in compliance with the License. |
||
10 | * You may obtain a copy of the License at |
||
11 | * |
||
12 | * http://www.apache.org/licenses/LICENSE-2.0 |
||
13 | * |
||
14 | * Unless required by applicable law or agreed to in writing, software |
||
15 | * distributed under the License is distributed on an "AS IS" BASIS, |
||
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
17 | * See the License for the specific language governing permissions and |
||
18 | * limitations under the License. |
||
19 | */ |
||
20 | |||
14 | daniel-mar | 21 | header('Content-Type:text/html; charset=utf-8'); |
22 | |||
23 | ?><html> |
||
24 | |||
2 | daniel-mar | 25 | <head> |
14 | daniel-mar | 26 | <meta charset="UTF-8"> |
2 | daniel-mar | 27 | <link rel="stylesheet" type="text/css" href="style.css"> |
28 | <title>Interprete a MAC address</title> |
||
29 | </head> |
||
30 | |||
31 | <body> |
||
32 | |||
33 | <h1>Interprete a MAC address</h1> |
||
34 | |||
35 | <p><a href="index.php">Back</a></p> |
||
36 | |||
37 | <pre><?php |
||
38 | |||
5 | daniel-mar | 39 | include_once __DIR__ . '/includes/mac_utils.inc.php'; |
2 | daniel-mar | 40 | |
41 | $mac = isset($_GET['mac']) ? trim($_GET['mac']) : ''; |
||
42 | |||
43 | if (!mac_valid($mac)) { |
||
44 | echo 'This is not a valid MAC address.'; |
||
45 | } else { |
||
15 | daniel-mar | 46 | decode_mac($mac); |
2 | daniel-mar | 47 | } |
48 | |||
49 | ?></pre> |
||
50 | |||
25 | daniel-mar | 51 | <br> |
52 | |||
2 | daniel-mar | 53 | </body> |
54 | |||
55 | </html> |