Dracom Posted October 29, 2006 Report Share Posted October 29, 2006 <html> <title> teste</title> <? function endereco_IP() { return getenv("REMOTE_ADDR"); //comando para pegar ip } $subtexto="seu IP é"; $nome=(endereco_IP()); echo "$subtexto"; echo "$nome"; $num="127.0.0.1"; $numero=(double)"127.0.0.1"; if (endereco_IP() == $numero){ $subtexto="normal ip"; } ?> </html> :lol: Quote Link to comment Share on other sites More sharing options...
0 DetonationS Posted November 3, 2006 Report Share Posted November 3, 2006 Esse script é muito simples,porém...Muito útil :Dfalou Quote Link to comment Share on other sites More sharing options...
0 Dracom Posted November 4, 2006 Author Report Share Posted November 4, 2006 Esse script é muito simples,porém...Muito útil :DfalouÉ, simples e pratico. :) Quote Link to comment Share on other sites More sharing options...
0 BEOC Posted November 12, 2006 Report Share Posted November 12, 2006 Simplifying:<? $ip = getenv("REMOTE_ADDR"); $txt = "seu IP é ".$ip; print $txt; if ($ip == '127.0.0.1'){ print "normal ip"; } ?> Thank's Quote Link to comment Share on other sites More sharing options...
0 mbleonardo Posted November 30, 2006 Report Share Posted November 30, 2006 string getenvNota: Esta função não funciona no modo ISAPI.Ou seja, melhor utilizar a superglobal $_SERVER["REMOTE_ADDR"] ao invés do getenv("REMOTE_ADDR") Quote Link to comment Share on other sites More sharing options...
0 nknk Posted December 15, 2006 Report Share Posted December 15, 2006 (edited) ficaria assim ?function endereco_IP() { return $_SERVER["REMOTE_ADDR"] //comando para pegar ip } $ip=(endereco_IP()); Edited October 15, 2008 by nknk Quote Link to comment Share on other sites More sharing options...
Question
Dracom
:lol:
Link to comment
Share on other sites
5 answers to this question
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.