Jump to content

Cum Aflu Ip-Urile Persoanelor Ce Imi Viziteaza Siteul?


Recommended Posts

Posted

Buna ziua 

As dori sa aflu cum as putea afla IP-urile vizitatorilor de pe siteul meu 

am gasit pe net un script nu stiu daca este bun si unde sa il pun (sutn incepator in chestile astea )

function get_ip_list() { 
$tmp = array(); 
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && strpos($_SERVER['HTTP_X_FORWARDED_FOR'],',')) { 
$tmp += explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']); 
} elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { 
$tmp[] = $_SERVER['HTTP_X_FORWARDED_FOR']; 
} 
$tmp[] = $_SERVER['REMOTE_ADDR']; 
return $tmp; 
}
echo echo implode(",",get_ip_list());

SA NU MA CRITICATI DIN CAZUA GRESELILOR DE ORTOGRAFIE CA NU SUNT ROMAN DE ACEEA AM SI O PROBLEMA IN A MA EXPRIMA  :(

Posted

Una dintre cele mai simple modalitati este prin utilizarea unui serviciu de monitorizare trafic, precum http://Piwik.org

Daca vrei o solutie custom, arunca o privire si peste: http://en.kioskea.net/faq/3328-save-the-ip-addresses-of-visitors-to-your-site si/sau http://daipratt.co.uk/mysql-store-ip-address/

 

Pentru a-l loga intr-un fisier text, ar trebui sa mearga:

<?
$log_file = "ip.txt";
$ip = getenv("REMOTE_ADDR");
$azi = date("j F Y, H:i:s");
$fp = fopen("$log_file", "a");
$ver = $_SERVER["HTTP_USER_AGENT"];
fputs($fp, "$ip - $azi - $vern");
fclose($fp);
echo"Ip-ul "."$ip "."conectat la "."$azi "."$ver";
?>

Te-ai inregistrat? Ne-ar placea sa te prezinti.

Cum pot sustine forumul?
Cumpara de la eMag folosind acest link.
--------------------
oG2BN9d.gifse1WdXd.gifQG6MtmI.gifRHYjDzD.gifG5p1wui.gif

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.