Subversion Repositories uuid_mac_utils

Rev

Rev 25 | Rev 32 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. <?php
  2.  
  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.  
  21. header('Content-Type:text/html; charset=utf-8');
  22.  
  23. ?><html>
  24.  
  25. <head>
  26.         <meta charset="UTF-8">
  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.  
  39. include_once __DIR__ . '/includes/mac_utils.inc.php';
  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 {
  46.         decode_mac($mac);
  47. }
  48.  
  49. ?></pre>
  50.  
  51. <br>
  52.  
  53. </body>
  54.  
  55. </html>
  56.