Hi,
I have been working with the following section of code and each time I run my script I get an error that states my function arguument (for array_unique) is not a valid array. Could someone please assist me? I am not sure where the error could be, but I think I have a valid one dimensional array that should go through array_unique.
$strend = 0;
$urlcount = 0;
// Find resource list (rlist) URLS
for($count=0; $count<$total; $count++){
$temp = file_get_contents($urls[$count]);
$website = htmlspecialchars($temp, ENT_QUOTES);
$total2 = substr_count($website,"<A HREF="/rlist/term/");
for($count2=0; $count2<$total2; $count2++){
$strstart = strpos($website,"<AHREF="/rlist/term/",$strend);
$strstart = strpos($website,"/rlist/",$strstart);
$strend = strpos($website, """, $strstart);
$strlen = $strend - $strstart;
$tempurl = $baseurl.substr($website,$strstart,$strlen);
$link[$urlcount] = html_entity_decode($tempurl, ENT_QUOTES);
$urlcount++;
}
}
$link = array_unique($link);
Any help is appreciated. Thanks!
-- Matt