Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <body>
- <form action="/" method="POST">
- Domain Name
- <input type="text" name="domain_name">
- <input type="submit" value="nslookup">
- </form>
- </body>
- </html>
- <?php
- function is_domain($domain)
- {
- //domain, sub domain, top level domain
- return preg_match('/^ (?: [a-z0-9] (?:[a-z0-9\-]* [a-z0-9])? \. )*[a-z0-9] (?:[a-z0-9\-]* [a-z0-9])?\.[a-z]{2,6}$/ix', $domain);
- }
- if(isset($_POST["domain_name"]) && is_domain($_POST["domain_name"]))
- {
- system("nslookup " . $_POST["domain_name"]);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment