<?php
#
# VWhois (ViaThinkSoft WHOIS, a fork of generic Whois / gwhois)
# Common functions in PHP
#
# (c) 2012-2018 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
#
# License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2)
#
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;
}
}