Initial Stuphs
First, you’ll need to know your IP address. This can easily be determined by adding the following code to a test file:
<?php
echo $_SERVER['REMOTE_ADDR'];
?>
The address that’s printed to the screen will be your very own internet address.
I prefer to use a prepended file on each of my sites, to cut down on the amount of code and also better my chances
that the code will be cached. This can be set in your php.ini file under the value: auto_prepend_file. Anything that
is common for every page on your site, and can be used before the file is loaded, goes into this file. Of course
you are free to add the code in any file you’d like.
that the code will be cached. This can be set in your php.ini file under the value: auto_prepend_file. Anything that
is common for every page on your site, and can be used before the file is loaded, goes into this file. Of course
you are free to add the code in any file you’d like.