PHP Classes

File: Help

Recommend this page to a friend!
  Classes of Francisco López  >  dXSS  >  Help  >  Download  
File: Help
Role: Documentation
Content type: text/plain
Description: Help and how to use
Class: dXSS
Filter dangerous values from the GET parameters
Author: By
Last change:
Date: 11 years ago
Size: 1,082 bytes


Class file image Download
A working example would be:

$g = new dXSS();
$g->url = '';
$g->longitud = 10;

This code must be before any output was produced from the browser. At the top of the page, for example.

In this way, accept parameters such as:

But do not accept such things as:<script>alert("XSS");</script>

It is quite interesting to define a small length whenever possible:

$g = new dXSS();
$g->url = '';
$g->longitud = 2;


But no:<meta%20http-equiv="refresh"%20content="0;">

or even:$%

NOTE: This class controls only received $ _GET parameters. Could easily adapt or modify the class to the information received by $ _POST or even to deal with both, but I wanted to show a very simple use and compatible with compatible with PHP versions lower than 5.

For more information send a message to info at phpclasses dot org.