]>
git.ipfire.org Git - thirdparty/sarg.git/blob - sarg-php/sarg-block-it.php
20efb9adcaf9d8e1df7c8a1351e64bdb2a8a702f
4 * AUTHOR: Pedro Lineu Orso pedro.orso@gmail.com
6 * SARG Squid Analysis Report Generator http://sarg-squid.org
9 * please look at http://sarg.sourceforge.net/donations.php
10 * ---------------------------------------------------------------------
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
28 $filename = "/usr/local/squid/etc/block.txt";
33 $ha = fopen($filename, 'a');
34 if ($filename == false) {
35 print (gettext ("Could not open the filename"));
36 echo ' '.$filename;
40 $written = fwrite($ha, $url);
42 if ($written != strlen($url)) {
43 print (gettext ("Write error"));
46 print (gettext ("Done!"));
48 echo "<a href=\"javascript:history.go(-1)\">";
49 print (gettext("Return"));
51 print (gettext (" to Sarg."));