Page 1 of 1

[Help] Unnecessary elements inside crawled values

Posted: Fri Jun 11, 2010 12:14 pm
by miniramen
Hello guys, I've been trying to crawl a site, but unfortunately I get the value with a lot of useless junk.
For example: Most of the datas are like this...I tried strip_tags, but that doesn't entirely remove everything.
</th> <td align="left">Heritage Inn</td>

So what should I do?


-_- The other problem is, when the data starts going in the MYsql database, it found a " ' " value and gave an error message. Is there anyway I can deal
with that too?


Sorrry if my question sounds noobish, I'm surely learning to do all this properly bits by bits.

Re: [Help] Unnecessary elements inside crawled values

Posted: Fri Jun 11, 2010 3:02 pm
by lunarnet76
hi,

you can use htmlentities to remove all the entities (or it might be the opposite, I can't remember),

to avoid the problem of ' you should use mysql_real_escape_string !