Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Avatar script


ghost's Avatar
0 0

This is the PHP script i use to change image size on my profile and in forums

use it if you want to, all you need is a 100x100 avatar for the forums, and a 120x120 avatar for your profile, tell me if you like it!

**hbh.jpg: **


$image120='120c.gif';
$image100='100c.gif';
$ref=$_SERVER['HTTP_REFERER'];

$profile = ($ref=='http://hellboundhackers.org/profile/HackingForce.html');
$profile2 = ($ref=='http://www.hellboundhackers.org/profile/HackingForce.html');

if($profile==true || $profile2==true){
header('Location: '.$image120);
} else {
header('Location: '.$image100);
}

?>```
**
.htaccess:**

```markupForceType application/x-httpd-php```


place the 'hbh.jpg' and the '.htaccess' in a directory with the avatars (120.whatever and 100.whatever), and use the hbh.jpg as your avatar pic :D

why we have 'ForceType application/x-httpd-php' in the .htaccess file?
and why not 'AddType application/x-httpd-php .jpg' ?

1. hbh doesn't allowed .php as avatar extension, then we use a .jpg as the PHP script

2. we use 'ForceType application/x-httpd-php' so the PHP server force all extension to be PHP

if we use 'AddType application/x-httpd-php .jpg' Firefox willl cache either the 100 pic or the 120 pic, and show only one of them, since they both lead to the same url...

'ForceType application/x-httpd-php' makes the avatars invalid for cache..and blahblahblah


Enjoy, im'a watch a movie now..:right::p

ghost's Avatar
0 0

Nice, I like it,how's my Avatar? =) It's a bad one >=)


ghost's Avatar
0 0

Nice script man! Thanks for sharing it! :)