You are here
Home > Php > Cross-Site Scripting Prevention in PHP

Cross-Site Scripting Prevention in PHP

XSS

Hello Friends, Today we’ll see Cross-Site Scripting Prevention in PHP. Cross-Site Scripting (XSS) is a web application Vulnerability in which attackers injects client site malicious scripts into web pages which then executes inside victims browser. To Prevent Cross-Site Scripting here we’ll use htmLawed. htmLawed is PHP library to purify & filter HTML. So Here is the code, we can use different config according to our need and to know more about config you can visit http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/htmLawed_README.htm#s2.2

index.php

Output

XSS-Prevention

Download Code

 

Thanks for stopping by
Please do share it helped

Rajesh Kumar Sahanee
I am a passionate Java Developer and I like Computer Programming. I love to do some interesting experiments and listening music in my free time.
https://www.zatackcoder.com

Comments

zatackcoder
Top