Guys,
Tabang beh.. I'm looking for a comment code that has sort of a spam filter or at least accepts HTML tags.. Kung pwde unta kanang with naay filter na e bawal ang mga <a href> or other html tags.. any help will be greatly appreciated..
Guys,
Tabang beh.. I'm looking for a comment code that has sort of a spam filter or at least accepts HTML tags.. Kung pwde unta kanang with naay filter na e bawal ang mga <a href> or other html tags.. any help will be greatly appreciated..
guys, help nmn dyan!
unsa nga scripting language? para asa ni siya? naa nay existing code?
It's not a comment code. haha
Learn about REGEX / Regular Expressions and String manipulations.
I use that to filter specific strings and tags... then parse it out as final output.
Last edited by dodie; 09-15-2010 at 11:31 PM.
I told you, you should use REGEX (Regual Expressions) and string manipulations.
It's the shortcut thing you'll ever get. Filtering TAGS cannot be handled by simple conditions.
Since you have your own Objectives to filter the tags, You have to deal with functions like these. Check the PHP documentaion manual how to use these functions. or just visit php.net website
Code:preg_replace(...,...,...); preg_match(...,..., ...); preg_match_all(...,..., ...); str_replace(...,...,..);
5 seconds limit can be handled in Javascript or storing TIMESTAMP within the Session or Cookie.
I think I just answered what you asked for, You have to deal with it..... Promise.
Last edited by dodie; 09-17-2010 at 01:07 PM.
kung php, naay built-in function para filter sa html tags... check this out for more info --> strip_tags
akong paagi kay di man nko i-filter, pero once i-display na gani nko ang string unya wa ko kabalo kung naa bay html tags or wala, ako ra gamitan ug htmlspecialchars para dili ma-interpret sa browser ang tags kung naa man gani. unya no actual loss of data pa jud kay mo-display as normal text man jafon ang tags.
Similar Threads |
|