Category Archives: PHP

Making darkness or brightness transparent

Let’s say you have the picture of a flame and you want to change the background. In order to do that you first must make the background transparent. But how can you do that? You can do it by hand using a brush but it’s not quite the effect I was looking for. So I [...]

Posted in PHP | Tagged , , , | 6 Comments

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 | 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 | Tagged , , , | 5 Comments