<?php
// example1 php showing Rex class in action
// ...
require "rex.class.php";
$rex = new rex();
$liga = mysql_connect("localhost", "user", "pass");
mysql_select_db("dbname", $liga);
$id = $_GET['id'];
// id not a numeric value?? Rex will log it
if (!is_numeric($id))
{
$ip = $_SERVER["REMOTE_ADDR"];
$query = $_SERVER["REQUEST_URI"];
$a = $rex->recordlog("$ip", "Malicious use on : $query");
header("Location: whereyouwant.php");
exit;
}
$sql = "SELECT * FROM tblusers WHERE id = '$id'";
$res = mysql_query($sql);
// ...
?>
|