This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Poor Man's Web Server with Regex Routing in 177 LOC of C# | |
// | |
// This is a simple standalone http server that handles routing with regular expressions | |
// matching. For each request the router passes capture groups to handlers as a data dictionary. | |
// | |
// Router implementation constructs a single composite regex to match request path, based on | |
// https://nikic.github.io/2014/02/18/Fast-request-routing-using-regular-expressions.html | |
// | |
// One can use `WebServer` and `Router` classes alone, just has to register all custom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$name = $_POST["name"]; | |
$surname = $_POST["surname"]; | |
$phone = $_POST["phone"]; | |
$to = "who@where.com"; | |
$subject = "Predmet mailu"; | |
$message = "Uzivatel $name $surname zada o kontakt na telefonu $phone"; | |
if (!mail($to, $subject, $message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
min = Option("min", ..., new IntType(0)); | |
max = Option("max", ..., new IntType(100)); |