[h1]Simple Viewing of IP Address + Browser/OS[/h1]
Here is a simple PHP code that returns the viewers IP address, and what browser/OS they are using. I have added in comments, so it's easy to follow. Hope you like it, though it doesn't do much, it is sorta cool. By the way, comments are referring to the line of code
ABOVE the comment.
<?php
//This is just saying that what follows is PHP code.
echo "Your IP Address is " ;
//When you have echo before something, it means what folows on that line will come out as text. The next text is just in their so the viewer knows what the numbers that follows are. Make sure you have a space after is but before the end quote.
echo $_SERVER['REMOTE_ADDR'];
//This code will display the IP address. Again, echo will display whatever follows, which in this case is code that grabs the IP address.
echo " and your browser is " ;
//This is just using echo again, and putting in the text and your browser is. Make sure to have a space after the first quote, and another before the second.
echo $_SERVER["HTTP_USER_AGENT"];
//This line of code simplys grabs the names of the browser, and displays it with echo.
?>
And the very last line just ends the PHP code. Very similiar to closing a HTML tag. Now, here is a version of the code without the comments.
<?php
echo "Your IP Address is " ;
echo $_SERVER['REMOTE_ADDR'];
echo " and your browser is " ;
echo $_SERVER["HTTP_USER_AGENT"];
?>
I hope you enjoyed my simple tutorial.

If you have questions, comments, or suggestions, either post in this thread, or email me at "rmjohnson307 [at] gmail [dot] com". (Change the [at] to @ and [dot] to a period)
Example Page:
Click here to see an example of this script.If you like this tutorial, please
Click here to register.
Click the link below to download the PHP file for this tutorial.
Simple Viewing of IP Address + Browser/OS PHP