Initial commit
[2ch-be.git] / dev-test / rewrite / tools / val_input.php
blobbd720a2dde40b65bfd3d2aab36130197c0d688a8
1 <?php
3 $a = $_REQUEST;
5 $username = trim($a['email']);
6 $int = trim($a['points']);
8 if ($username == null){
9 echo "No username";
10 exit;
13 if (filter_var($username,FILTER_VALIDATE_EMAIL)) {
14 $username = (filter_var($username, FILTER_SANITIZE_EMAIL));
15 } else {
16 echo "Invalid email";
17 exit;
20 if(!ctype_digit(ltrim((string)$int, '-'))) {
21 echo("Invalid amount of points");
22 exit;
25 $ip = $_SERVER['REMOTE_ADDR'];
27 //echo "correct";
29 $exec = shell_exec("php /home/auth/secure_html/setpoints.php $username $int $ip") or die("error!");
30 echo $exec;