Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function enable_code($mac,$access_code,$code)
- {
- $host = 'localhost';
- $database = 'xxxxx';
- $user = 'xxxx';
- $pass = 'xxxx';
- $link = mysqli_connect($host,$user,$pass,$database);
- if(!$link){die("Database connection failde: ".mysqli_error());}
- $dbselect = mysqli_select_db($link,$database);
- if(!$dbselect){die("Database selection failed: ".mysqli_error($link));};
- if ($access_code == $code)
- {
- shell_exec("iptables -t mangle -I internet 1 -m mac --mac-source ".$mac." -j ACCEPT");
- mysqli_query($link,"UPDATE dataconnection SET enable = 1 WHERE mac = '$mac'");
- sleep(1);
- header("location:http://".$_GET['add']);
- exit;
- }
Add Comment
Please, Sign In to add comment