php invalid username or key success user _GET user key _GET key echo f

1
2
3
4
5
6
7
8
<?php
/*
0 - invalid username or key
1 - success
*/
$user = $_GET['user'];
$key = $_GET['key'];
echo (!file_exists($user . '.txt') || file_get_contents($user . '.txt') != $key ? '0' : '1');