30 function getHost($URL)
36 $host = parse_url($URL, PHP_URL_HOST);
44 if ($host ==
'localhost')
46 $realHost = exec(
"hostname -f", $out, $rtn);
66 function getMailSubjects() {
71 $MailFile =
"/var/mail/";
75 $user = exec(
'id -un', $out, $rtn);
76 $UserMail = $MailFile . $user;
77 if(file_exists($UserMail) === FALSE) {
78 return(array(
"ERROR! $UserMail does not exist"));
80 $FH = fopen($UserMail,
'r');
82 return(array(
"ERROR! Cannot open $UserMail"));
86 $matched = preg_match(
'/Subject:\sFOSSology Results.*?$/',$line, $matches);
104 function makeUrl($host, $query) {
109 if (empty ($query)) {
112 return (
"http://$host$query");