Welcome to WebmasterWorld Guest from 54.145.208.64

Forum Moderators: incrediBILL

Message Too Old, No Replies

Links

   
5:21 am on May 4, 2001 (gmt 0)



I have built a robot into my forum script that parses the message form for keywords and links them with relevent pages on the site. The script works fantastically and the number of pages viewed per visitor has risen considerably, BUT, words are often repeated in messages and thus links are repeated. How will search engines deal with this?
11:58 am on May 4, 2001 (gmt 0)

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



It would be seen as machine generated spam I'm affraid. What language?

If perl, just map your words into an associative array for easy removal of the dupes.

@page = split(/ /,$page); #where $page = the page text.
foreach (@page) {
%words{$_}++;
}
#now the page words are in %words.

foreach $key (sort keys %words) {
$key ...do something with the word here for your link...
}

There are a bazillion ways to do it depending on your structure. I'd certainly get rid of the dupes.

5:05 pm on May 4, 2001 (gmt 0)



Thanks Brett. I figured the extra links wouldn't help. Unfortunately, my script is a bit more complicated. For example, the word "script" could be linked to any number of pages depending on the context of the sentence. Manipulating the words would crush the algorithm I'm currently using.

Would a search engine see a difference between...

/search.html?foo1 or /search.html#foo1
/search.html?foo2 or /search.html#foo2

...even if they are both the same page? If they would see a difference then my solution would be vastly simplified.

5:41 pm on May 4, 2001 (gmt 0)



Maybe this will help.

Here is the current code:
$message =~ s/ any words/ <a href="$link">any words<\/a>/g;

$message = entire variable from text input form
$link = link to keyword page
" any words" = parsed language in form($message)

Now lets say that there are three occurances of " any words" in $message. How would I change just the first occurance into a link and leave the rest alone?

6:43 pm on May 4, 2001 (gmt 0)

10+ Year Member



Remove the global option (g)in the substitution.
i.e
$message =~ s/ any words/ <a href="$link">any words<\/a>/;
7:46 pm on May 4, 2001 (gmt 0)



That worked PerlyKing! I now have a lean green forum machine :)

Now that the messages will be linked to relevent pages (automatically) on the site (without repetitive links) how do you (or others) think the search engine spiders will react?