Jump to content

Cum Aflu Ip-Urile Persoanelor Ce Imi Viziteaza Siteul?


Tomi

Recommended Posts

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  :(

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.