...

View Full Version : Meta refresh issues need urgent help!!



bobbynomates
12-18-2009, 04:08 PM
Hi guys,

Just wanted to know is there any possible way to stop people posting meta refresh tags from a form in my site?? The site itself is an online game, and im currently getting idiots from all sorts of places posting refresh tags to there sites, now its easy to remove them but i want to stop them permanantly is there a code i can use to stop them being posted???? please help

Rowsdower!
12-18-2009, 08:39 PM
Hi guys,

Just wanted to know is there any possible way to stop people posting meta refresh tags from a form in my site?? The site itself is an online game, and im currently getting idiots from all sorts of places posting refresh tags to there sites, now its easy to remove them but i want to stop them permanantly is there a code i can use to stop them being posted???? please help

The exact solution depends on how your page works. If it's PHP-based, which it most likely is, just use the htmlspecialchars() (http://php.net/manual/en/function.htmlspecialchars.php) function to strip them down to encoded text (so for example instead of the user getting to post the character "<" it would post the encoded string for that character, which is "&lt;" -- htmlspecialchars does this for all html special characters so that no HTML code entered by your user is parsed by the browser).

abduraooft
12-19-2009, 10:31 AM
Use strip_tags() (http://php.net/strip_tags), if don't want to allow people for posting any html content.

Rowsdower!
12-19-2009, 01:23 PM
Use strip_tags() (http://php.net/strip_tags), if don't want to allow people for posting any html content.

That would keep legitimate users from entering certain characters even in appropriate ways ("<" and ">" come to mind). Depending on the OP's needs this might be overkill. Instead, htmlspecialchars would still include those restricted characters, but would just encode them so they are viewable but not parsed.

Then again, if we're only concerned about meta refresh tags then a regular expression search and replace of the post might prove to be the most useful option of all.

But we still don't know yet if OP is even using PHP...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum