39 public $filesWithLicense;
42 function __construct($page, $url)
54 $this->host = getHost($url);
71 $regExp =
"Folder<\/b>:.*?/font>";
72 $numberMatched = preg_match_all(
"|$regExp|s", $this->page, $pathLines, PREG_SET_ORDER);
73 $this->filesWithLicense = $pathLines;
77 return($numberMatched);
99 foreach ($this->filesWithLicense as $aptr)
101 foreach ($aptr as $path)
106 foreach ($paths as $apath)
108 $regExp =
".*?href='(.*?)'>(.*?)<\/a>(.*?)<";
109 $matches = preg_match_all(
"|$regExp|i", $apath, $pathList, PREG_SET_ORDER);
141 for ($i = 0; $i < $matches; $i++)
143 $cleanKey =
trim($list[$i][2],
"\/<>b");
144 if (empty ($cleanKey))
149 $partLink = $list[$i][1];
150 $link = makeUrl($this->host, $partLink);
151 $rtnList[$cleanKey] = $link;
155 if (!empty ($list[$i][3]))
157 $cleanKey =
trim($list[$i][3],
"\/ ");
158 if (empty ($cleanKey))
162 $rtnList[$cleanKey] = NULL;
168 public function setPage($page)
_createRtnArray($list, $matches)
char * trim(char *ptext)
Trimming whitespace.