Login   Register  
PHP Classes
elePHPant
Icontem

File: examples/example4.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of David Ferreira  >  Rex  >  examples/example4.php  >  Download  
File: examples/example4.php
Role: Example script
Content type: text/plain
Description: Example script on how to use Rex class
Class: Rex
Check proxy addresses and filter Javascript
Author: By
Last change: v1.1 update
Date: 5 years ago
Size: 400 bytes
 

Contents

Class file image Download
<?php
// example4 php showing Rex class in action

// ...
require ("rex.class.php");
$rex = new rex();

$var "<h1>Test</h1>";

// Filter for possible XSS attacks
$a $rex->filterxss($var1);

// prints <h1>Test</h1> but not executing the HTML
echo $a;

// Filter for possible XSS attacks
$b $rex->filterxss($var0);

// prints Test removing the tags
echo $b;

// ...

?>