41 function getHost($URL)
47 $host = parse_url($URL, PHP_URL_HOST);
55 if ($host ==
'localhost')
57 $realHost = exec(
"hostname -f", $out, $rtn);
77 function getMailSubjects() {
82 $MailFile =
"/var/mail/";
86 $user = exec(
'id -un', $out, $rtn);
87 $UserMail = $MailFile . $user;
88 if(file_exists($UserMail) === FALSE) {
89 return(array(
"ERROR! $UserMail does not exist"));
91 $FH = fopen($UserMail,
'r');
93 return(array(
"ERROR! Cannot open $UserMail"));
97 $matched = preg_match(
'/Subject:\sFOSSology Results.*?$/',$line, $matches);
115 function makeUrl($host, $query) {
120 if (empty ($query)) {
123 return (
"http://$host$query");