user Posted December 4, 2003 Report Share Posted December 4, 2003 taatad? zinu, ka var arast noteikti kaadaa manuaali... bet.. mosh kaads aatri var pateikt? thanx Link to comment Share on other sites More sharing options...
user Posted December 4, 2003 Author Report Share Posted December 4, 2003 ok nevajag... baigi gari: <?php function GetIP(){ if (@getenv("HTTP_CLIENT_IP") && @strcasecmp(@getenv("HTTP_CLIENT_IP"), "unknown")) $ipxx = @getenv("HTTP_CLIENT_IP"); else if (@getenv("HTTP_X_FORWARDED_FOR") && @strcasecmp(@getenv("HTTP_X_FORWARDED_FOR"), "unknown")) $ipxx = @getenv("HTTP_X_FORWARDED_FOR"); else if (@getenv("REMOTE_ADDR") && @strcasecmp(@getenv("REMOTE_ADDR"), "unknown")) $ipxx = @getenv("REMOTE_ADDR"); else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && @strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) $ipxx = $_SERVER['REMOTE_ADDR']; else $ipxx = "unknown"; return($ipxx); } $ip=GetIP($ipxx); ?> Link to comment Share on other sites More sharing options...
Digital-X Posted December 6, 2003 Report Share Posted December 6, 2003 (edited) Ir pavisam vienkaarshi ip njeemeeji: <?PHP $IP = $_SERVER['REMOTE_ADDR']; $refer = $_SERVER['HTTP_REFERRER']; $req = $_SERVER['REQUEST_URI']; $uagent = $_SERVER['HTTP_USER_AGENT']; $location = "./stats/ip.html"; $fp = fopen($location,"a"); fputs($fp, " <div><- USER WITH IP: <b>$IP</b> , FROM: <b>$refer</b> , TO: <b>$req</b> , WITH: <b>$uagent</b> -></div>"); fclose($fp); ?> Edited December 6, 2003 by Digital-X Link to comment Share on other sites More sharing options...
kapracis Posted June 2, 2007 Report Share Posted June 2, 2007 Kur sitais ir jaliek kipa index.php vai ari jataisa jausn php dokuments ludzu pasakat es iesacejs Link to comment Share on other sites More sharing options...
litt Posted June 2, 2007 Report Share Posted June 2, 2007 Pamēģini ielikt jaunā failā un paskaties kas notiek. Pamēģini ielikt index.php un paskaties kas notiek. Kurš Tavā vietā mēģinās, ja ne Tu pats? Link to comment Share on other sites More sharing options...
andrisp Posted June 2, 2007 Report Share Posted June 2, 2007 Jāliek tur, kur vajag zināt apmeklētāja IP adresi, kur tad citur ? Link to comment Share on other sites More sharing options...
Kavacky Posted June 3, 2007 Report Share Posted June 3, 2007 Un vispār nevajag tik gari: echo getenv('REMOTE_ADDR'); Link to comment Share on other sites More sharing options...
Stopp Posted June 6, 2007 Report Share Posted June 6, 2007 Palasies: http://lv2.php.net/reserved.variables#rese...ariables.server Link to comment Share on other sites More sharing options...
Recommended Posts