Secure XSS filter PHP function


Xss is a well known vulnerability of websites. This can cause a great harm to website and servers. Most of the web developers do not know about this. This is the main reason why cyber crimes are on the way. Every web developers should know about these website vulnerabilities. In one of my post I wrote some website security tips for web developers  While surfing on internet I came across some code to filter PHP XSS attacks.License:
This code is public domain, you are free to do whatever you want with it, including adding it to your own project which can be under any license.Put this in a function in your webpage and pass every variable to filter xss strings. The goal of this function is to be a generic function that can be used to parse almost any input and render it XSS safe.

I also came to know about about another XSS filtering function in PHP. It can cleans various UTF encodings & nested exploits.



Written by Deepanker

Deepanker Verma is the founder of Techlomedia. He is a tech blogger, developer and gadget freak.

Leave a Reply

Your email address will not be published. Required fields are marked *


Load time SEO

Importance of Website’s speed in search engine ranking

Google Adsense

How to Get Your Adsense Account Easily Approved