You are here

function spam_urls_count in Spam 5

Keep track of the total number of URLs found in the current content.

Parameters

$url A URL to be added to a static array.:

Return value

Array of URLs showing how many times each URL is present, and the total number of arrays.

2 calls to spam_urls_count()
spam_content_filter in ./spam.module
Determine whether or not provided text is spam.
spam_tokenize in ./spam.module
Divide a string into tokens.

File

./spam.module, line 1358

Code

function spam_urls_count($url = NULL) {

  // build up an array of all URLs seen in current content
  static $urls = array();
  if ($url != NULL) {
    $urls["{$url}"]++;
    $urls['total']++;
  }
  return $urls;
}