Rich Bitch Posted April 30, 2010 Report Share Posted April 30, 2010 Ir tā, ka mēģinu nolasīt apmeklētāja IP adrese ar šādu skriptu $_SERVER['REMOTE_ADDR'], bet dažiem no apmeklētājiem tā uzrādās šāda: 0.0.0.0 Kāpēc tā un kā dabūt šo apmeklētāju adresi? paldies! Quote Link to comment Share on other sites More sharing options...
bobsters Posted April 30, 2010 Report Share Posted April 30, 2010 Pasties seit Quote Link to comment Share on other sites More sharing options...
Rich Bitch Posted April 30, 2010 Author Report Share Posted April 30, 2010 uz google arī es māku norādīt atbildes lietotāju jautājumiem, kuriem nezinu atbildi :D Quote Link to comment Share on other sites More sharing options...
bobsters Posted April 30, 2010 Report Share Posted April 30, 2010 bet tur ir viss pateikts kāpēc uzrāda IP 0.0.0.0 te tev neviens neko jaunu nepateiks! pateiks to pašu tikai latviešu valodā Quote Link to comment Share on other sites More sharing options...
Rich Bitch Posted April 30, 2010 Author Report Share Posted April 30, 2010 nevienā no pirmajiem 10 rezutātiem problēma nebija aprakstīta. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted May 1, 2010 Report Share Posted May 1, 2010 function get_IP() { return (empty($_SERVER['HTTP_CLIENT_IP']) ? (empty($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['REMOTE_ADDR'] : $_SERVER['HTTP_X_FORWARDED_FOR']) : $_SERVER['HTTP_CLIENT_IP']); } Es pašlaik izmantoju tādu metodi, bet, šķiet, ka šī metode anv 100% pilnīga... :( Kāds nevēlās to savest kārtībā?? :D Quote Link to comment Share on other sites More sharing options...
Rich Bitch Posted May 2, 2010 Author Report Share Posted May 2, 2010 kāpēc domā, ka nav pilnīga? Quote Link to comment Share on other sites More sharing options...
daGrevis Posted May 2, 2010 Report Share Posted May 2, 2010 Cik pētīju, ir vēl $_SERVER[] mainīgie, kas varētu teorētiski "atgriezt" IP, ja lietotājs ir "paslēpies" kādā netradicionālā veidā... :) Quote Link to comment Share on other sites More sharing options...
waplet Posted May 2, 2010 Report Share Posted May 2, 2010 un vai tad tie nav aplūkoti tavā kodā? :D Quote Link to comment Share on other sites More sharing options...
ezis Posted May 2, 2010 Report Share Posted May 2, 2010 $check = array( 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'HTTP_VIA', 'HTTP_X_COMING_FROM', 'HTTP_COMING_FROM', 'HTTP_CLIENT_IP' ); tad mauc ciklā cauri... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.