hackerman Posted April 5, 2007 Report Share Posted April 5, 2007 (edited) Kā var nolasīt online esošo cilvēku ip adreses? Lai būtu līdzīgi kā šeit http://php.lv/f/index.php?act=Online&C...;sort_key=click . Un pie reizes, arī kā noteikt kur viņš atrodas. --------------------------------------------- Ir txt fails. Ieraksta informācīju txt failā un viss strādā. Pēc tam paņemu include('fails.txt'); Lieta tāda, ka man informācija, kas ir iekš txt faila ir vairākās rindās, bet ar include viņš parāda visu info tikai vienā rindā. Kā panākt, lai rāda vairākās rindās? likt <br> vai kko tml. ? Edited April 5, 2007 by hackerman Link to comment Share on other sites More sharing options...
bubu Posted April 5, 2007 Report Share Posted April 5, 2007 1) rtfm: http://lv.php.net/manual/en/reserved.varia...ariables.server 2) vai nu <br> vai nl2br() Link to comment Share on other sites More sharing options...
Grey_Wolf Posted April 5, 2007 Report Share Posted April 5, 2007 Un pie reizes, arī kā noteikt kur viņš atrodas. Ar buramvardiem ;) Vai arii skaties uz ko liidziigu GeoIP ... Link to comment Share on other sites More sharing options...
*jancis38* Posted April 7, 2007 Report Share Posted April 7, 2007 es izmantoju šitādu: <?PHP $usrIP=(isset($_SERVER['REMOTE_ADDR'])?$_SERVER['REMOTE_ADDR']:''). (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR']!='unknown'?' fwd '.$_SERVER['HTTP_X_FORWARDED_FOR']:''). (isset($_SERVER['HTTP_CLIENT_IP'])?' client_ip '.$_SERVER['HTTP_CLIENT_IP']:''). (isset($_SERVER['HTTP_VIA'])?' via '.$_SERVER['HTTP_VIA']:''); if ($_SERVER['SERVER_PORT']!=443) { $url = "http://". $_SERVER['SERVER_NAME'] . "" . $sslport . $_SERVER['REQUEST_URI']; echo "$usrIP - $url"; } ?> Link to comment Share on other sites More sharing options...
andrisp Posted April 8, 2007 Report Share Posted April 8, 2007 *jancis38*, kāds tam sakars ar šo postu ? Link to comment Share on other sites More sharing options...
*jancis38* Posted April 8, 2007 Report Share Posted April 8, 2007 es domāju, ka tas iespējams palīdzēs... viņš nolasa IP adresi un parāda kurā linkā lietotājs atrodas. Piem.: 127.0.0.1 - http://localhost/index.php :) Link to comment Share on other sites More sharing options...
andrisp Posted April 8, 2007 Report Share Posted April 8, 2007 Nevaru iedomāties, kā tas var palīdzēt. :/ Link to comment Share on other sites More sharing options...
Recommended Posts