Jump to content
php.lv forumi

Netieku skaidriba


Darkangel

Recommended Posts

<?php
include "connect.php";


// get data that sent from form
$date = date("d-m-y---H-i");
$ip = getenv("REMOTE_ADDR");
$host = gethostbyaddr($ip);


$sql="INSERT INTO ip(Datum, IP, Host)VALUES('$date', '$ip', '$host')";
$result=mysql_query($sql);

mysql_close();
?>

 

Es netieku skaidriba kape vins nerada citu user pc vardu bet tikai to kuru uz ka stav pats web servers.

Link to comment
Share on other sites

Ja to scriptu laid tikai tu, tad tevi ari tikai radis, lokalo adresi.

Edited by cucumber
Link to comment
Share on other sites

Es vnk velejos ustaisit taka admina paneli kura neviens ieksa netiek iznemot mani un lai nebutu jaraksta nekads login un parole + man ira mdsl un man ip mainas taka es gribeju atrast labaku veidu ka autorizeties. Jo man velak tas vis japarliek uz citu serveri busss. Un tape cereju ustaisit autorizaciju pec pc varda.

Edited by Darkangel
Link to comment
Share on other sites

.htaccess deny allow neders?

Edited by cucumber
Link to comment
Share on other sites

cucumber, taču pateica, ka mainās ip.

 

Varbūt pamēģini kko tml:

Vispirms apskaties ko tev tur parāda:

$cname = gethostbyaddr($_SERVER[REMOTE_ADDR]);
echo $cname;

 

Un tagad, kad zini kāds tev tas $cname ir, pārbaudi:

if($cname == "tavs_cname"){
//raada lapu
}else{
echo "suukaa ledu :P";
}

 

p.s. jā, es varu uzlikt tādu pc vārdu, kāds ir tev un ielogoties kā admins. Bet es piem. laužot lapu to neiedomātos, vienīgais, ja būtu tāda jēla sagadīšanās.

Edited by hackerman
Link to comment
Share on other sites

×
×
  • Create New...