Tag Archives: PHP

404 email alert

Here is a little PHP code snippet to add to your 404 page, in order to get an email alert with all sorts of useful data, each time a 404 page is accessed.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
if(isset($_SERVER[’HTTP_REFERER’])) {
$ref=$_SERVER[’HTTP_REFERER’];
}
else{
$ref=’none’;
}
 
$sitename=’Reflection Media’;
 
$recipient = ‘mail@gmail.com’;
$subject = ‘New ‘.$sitename.’ 404 accessed’;
$mail_body = ‘
A new 404 page has been accessed:
 
The accessed [...]

Posted in PHP | Also tagged , , | 1 Comment

Fun with PHP

OK. So we know that instead of using the database, regular files can be used. It’s quite ineffective, but it’s possible. This means that the database structure and the regular file structure are somehow interchangeable.
So… this would mean that the database can be used instead of regular files.
Now, this is the obvious use of the [...]

Posted in PHP | Also tagged , , | 5 Comments