Auto-including files in Apache
In order to automatically include files in Apache, you can use the following directives.
This can be useful when, for example, you have a logging script that needs to run each time a page is viewed.
Block images from being hotlinked
use the following in your .htaccess to block images being hot linked from other sites.
*Make sure to place your .htaccess file in your images directory
Interactive Mode (in FTP)
When using mget, you can turn the prompting to copy each file "off" by issuing a the command "prompt".
Setup a cron job to run a PHP script
Here is the process for setting up a cron job which runs a PHP script:
For the purposes of testing my cron job, I created a script which simply sends me an email. The script also sends the REMOTE_ADDR in the email, so we can determine whether the...
using chmod
You can use chmod to alter security for files and directories.
Be careful with these commands as their usage has serious security implications that you need to make yourself aware of.
Note the following directly after the chmod commands below:
...
Using Grep to view maillog
You can use grep to view log files (even as they are written).
This example describes using maillog, which logs user authentications into a mail account.