Radovan,

Searching for words that are not the same color as the background could be
interesting depending on a lot of things.

1. Does the page use CSS?
2. Are background/font colors defined as "red" or "#FF0000"?
3. Where are background colors defined? (i.e. <body> or <table> or <td> or
...) (you already answered this one...oops)
4. Are you loading this into a database or is it a script to search just a
single page?

This sounds rather complicated, but nothing a clever hack couldn't fix :)

You'll likely want to read the file line by line, storing the most current
background color in a variable, then comparing to see if any text is NOT
that color, then loading those words to an array (likely). Then, if a
background color changes, you'll update the variable (at that point).

Perhaps, if background colors are always defined as bgcolor, you should
split the string up by that so if a bgcolor setting is midway through the
line it won't miss text before that bgcolor setting. i.e.:

<hr><font color=#555555>blah grey text<table bgcolor=#555555>
<tr><td>moretext</td></tr></table>

etc.

Just thoughts off the top of my head. No guarantees.

-Dash

LIBRA (Sep. 23 to Oct. 22)
        Your desire for justice and truth will be overshadowed by your
        desire for filthy lucre and a decent meal.  Be gracious and
        polite.  Someone is watching you, so stop staring like that.

On Fri, 17 Jan 2003, Radovan Radic wrote:

> Either noone can read this message, or noone can help about it?
>
> Come on ppl give me some feedbacl
>
> "Radovan Radic" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi all
> >
> > I got (i think) heavy task for my school project. I
> > hope someone can help
> > me.
> > Script needs to find key words (for example: computer,
> > science)
> > It should search in url or mail
> > Script should find words within meta-tags (i know how
> > to do it) and:
> > In the body of html (url or email) but only if the
> > words are different color
> > than the background!
> > BG could be table, tr, td, body...
> > Do i need to parse it, how can i obtain color of the
> > found text, is preg()
> > helpful...?
> >
> > Could anyone help me with the tips
> >
> > Thx,
> > Radovan
> >
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > http://mailplus.yahoo.com
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to