iGuest 3 Report post Posted January 19, 2005 here:just copy to a PHP file. <?php $ip=@getenv("REMOTE_ADDR"); echo "Your IP is: <B>$ip</B>";?> To add to HTML:<Script Language=php>$ip=@getenv("REMOTE_ADDR"); echo "Your IP is: <B>$ip</B>";</script>OR:<?= "Your IP is: <b>".getenv('REMOTE_ADDR')."</b>" ?>[4 Second option ull have to edit php.ini file][Thank You CodeFX] Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 19, 2005 The second way won't work. You can't embed PHP code in a .html document without modifying php.ini, and even then it wouldn't work. Assuming it goes through the parser, which means it is either a .php file or you have edited php.ini, The correct syntax would be: <script language="php">$ip=@getenv("REMOTE_ADDR");echo "Your IP is: <B>$ip</B>"; </script> But anyway, thanks. I didn't know how to do that.P.S. You could also use this statement:<?= "Your IP is: <b>".getenv('REMOTE_ADDR')."</b>" ?> Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 19, 2005 Cool, where did you learn php? Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 19, 2005 From just about the biggest book that was ever written on it... PHP and MySQL Web Development. You can get it off amazon. Share this post Link to post Share on other sites