require_once "dbcon.php";
$url = $_GET['cut'];
if(!empty($url)){
$sqlreq = mysqli_query($vendor, "SELECT * FROM url-cut WHERE link = '.$url.'");
};
function tok_gen($min = 5, $max = 8){
$alf = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$new = str_split($alf);
$tok = '';
$rand = mt_rand($min, $max);
for($i = 0; i<$rand;$i++){
$tok .= $new[mt_rand(0, sizeof($new) - )];
};
};