26 public $filesWithLicense;
29 function __construct($page, $url)
41 $this->host = getHost($url);
56 $regExp =
"Folder<\/b>:.*?/font>";
57 $numberMatched = preg_match_all(
"|$regExp|s", $this->page, $pathLines, PREG_SET_ORDER);
58 $this->filesWithLicense = $pathLines;
62 return($numberMatched);
84 foreach ($this->filesWithLicense as $aptr)
86 foreach ($aptr as $path)
91 foreach ($paths as $apath)
93 $regExp =
".*?href='(.*?)'>(.*?)<\/a>(.*?)<";
94 $matches = preg_match_all(
"|$regExp|i", $apath, $pathList, PREG_SET_ORDER);
126 for ($i = 0; $i < $matches; $i++)
128 $cleanKey =
trim($list[$i][2],
"\/<>b");
129 if (empty ($cleanKey))
134 $partLink = $list[$i][1];
135 $link = makeUrl($this->host, $partLink);
136 $rtnList[$cleanKey] = $link;
140 if (!empty ($list[$i][3]))
142 $cleanKey =
trim($list[$i][3],
"\/ ");
143 if (empty ($cleanKey))
147 $rtnList[$cleanKey] = NULL;
153 public function setPage($page)
_createRtnArray($list, $matches)
char * trim(char *ptext)
Trimming whitespace.