Basic Predefined Variables
PHP Code Examples
[Download]   [Execute]
<?php 
$title = "Basic Predefined Variables";
include '../head1.inc'; ?>

PHP provides a large number of pre-defined variables which 
send information into the script.
<p>
Greetings, web surfer!  You have reached here from
<?php echo $_SERVER['REMOTE_ADDR']; ?>
using
<?php echo $_SERVER['HTTP_USER_AGENT']; ?>.
You came here from <?php echo $_SERVER['HTTP_REFERER'];?>, and
this page was delivered to you
by the <?php echo $_SERVER['REQUEST_METHOD']; ?> method of HTTP.

<p>
<?php $r = $_SERVER['HTTP_REFERER'];
echo "<a href=\"$r\"><i>Return</i></a>"; ?>
</body>
</html>