not previous included files added
[curl-de-sac.git] / web / proxy_check.php
1 <?php
2 /*
3  *  curl-de-sac - proxy_check
4  *
5  *  Copyright (C) 2014-2015 Matteo Nastasi
6  *                          mailto: nastasi@alternativeoutput.it
7  *                                  matteo.nastasi@milug.org
8  *                          web: http://www.alternativeoutput.it
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful, but
16  * WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABLILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * General Public License for more details. You should have received a
19  * copy of the GNU General Public License along with this program; if
20  * not, write to the Free Software Foundation, Inc, 59 Temple Place -
21  * Suite 330, Boston, MA 02111-1307, USA.
22  *
23  */
24
25 $G_base = "./";
26
27 require($G_base . 'Obj/proxy_detector.phh');
28
29 function main()
30 {
31     GLOBAL $_POST;
32     
33     $hea = apache_request_headers();
34
35     print_r($hea);
36
37     $addr = $_POST['conn_ip'];
38
39     if (is_proxy($addr)) {
40         printf("is_proxy=true\n");
41     }
42     else {
43         printf("is_proxy=false\n");
44     }
45 }
46
47 main();
48 ?>