You are here

function lc_GetUniqueUrls in Link checker 5

1 call to lc_GetUniqueUrls()
lc_DoLinkChecks in ./linkchecker.module

File

./linkchecker.module, line 450
This module periodically check html links referenced by drupal nodes Developed and maintained by Marek Tichy, marek@ecn.cz

Code

function lc_GetUniqueUrls($html) {
  if (!$html) {
    return false;
  }

  // Gets the list of urls
  $urls = lc_GetUrls($html);
  $uurls = array();
  for ($i = 0; isset($urls[$i]); $i++) {

    // Checks if the url is in the array
    if (!in_array($urls[$i], $uurls)) {

      // If it's not it adds it
      $uurls[] = $urls[$i];
    }
  }
  return $uurls;
}