$nom=$_GET["nom"];
//echo $nom;
// COMPROBA PARAULES PROHIBIDES, Y SALUDA A L'ESPAMMER
$correcte='S';
//*******array de paraules prohibides
$prohibides=array("sample","email.tst","tst","acunetix","*"," ","=","-","@","insert","drop","\\",",","select","{","}","http","script","url","a href","none","<",">","Refresh","HTTP-EQUIV","http","Unknown","null","insert","delete",);
//*******comprobacio als diferents camps
foreach ($prohibides as $pro)
if (preg_match ($pro, $nom))
{echo "
VETE A LA MIERDA, CABRÓN.";
$correcte='N';
}
//*** SI no hi ha cap error, correcte==S i continua. Si correcte==N, es para.
if ($correcte=='N')
echo "";
else{
// Fi comprobació paraules clau.
//SI NO HI HA NOM DE PÀGINA, NO CREA COMPTADOR I DONA ERROR
if ($nom=='') echo "ERROR";
else {
//* CONNECTA AMB BASE DE DADES DESPRES DE DEMANAR L'ARXIU DE CONTRASENYES*//
require (".htpasswd");
$idconnect=mysqli_connect($lloc,$usuari,$password,$dbname);
if ($idconnect==0)
{
echo "Lo sentimos no se ha podido ";
echo "conectar con la base de datos.";
}
else
{
// echo "
linia 35, debug";
mysqli_select_db($dbname,$idconnect);
$idresult2=mysqli_query ($idconnect,"SELECT * from contador where nom='$nom'");
if ($idresult2==0) echo "La sentencia 02 es incorrecta.";
else {
while ($registro=mysqli_fetch_array($idresult2))
{
$visites=$registro["visites"];
$visites=$visites+1;
echo "