<?php
#
# generic Whois - Automatic Pattern Generator configuration
#
# (c) 2012-2018 Daniel Marschall, ViaThinkSoft [www.viathinksoft.de]
#
# Distribution, usage etc. pp. regulated by the current version of GPL.
#
#
# Version 2018-10-26
#
function parse_config($file) {
$count = 0;
foreach ($cont as $c) {
if ($c == '') continue;
if ($c[0] == '#') continue;
// true/false does not work for bash, so we do not accept it here either
/*
if (strtolower($val) === 'no') $val = false;
if (strtolower($val) === 'false') $val = false;
if (strtolower($val) === 'yes') $val = true;
if (strtolower($val) === 'true') $val = true;
*/
$val = str_strip_quotes($val);
$count++;
}
return $count;
}
function str_strip_quotes($x) {
if (((substr($x,0,1) == '"') && (substr($x,-1,1) == '"')) ||
} else {
return $x;
}
}