Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2008
    Location
    Wales
    Posts
    3,594
    Tokens
    1,387
    Habbo
    Skizzling

    Latest Awards:

    Default Turning .php into a .png [+REP]

    Quite a nooby question..

    But I have a PHP GD image thing which grabs the background colour of the image and the Habbo which you can see here; http://habbotbh.com/avatar/index.php?h=Skizzling&s=2

    I would I go about making it so it's habbotbh.com/avatar/index.png?h=Skizzling&s=2

    +REP to everyone that helps!

    Thanks.
    Last edited by Calvin; 30-12-2009 at 01:00 AM.

  2. #2
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    7,554
    Tokens
    0

    Latest Awards:

    Default

    It is a png file, otherwise just use htacess to rename it.. Its called mod_rewrite

    Yours would be something like this:

    Code:
    RewriteEngine on
    RewriteRule ^index.php?h=$1&s=$2 index.png?h=$1&s=$2
    I didn't test the code but it should work?

  3. #3
    Join Date
    Jan 2008
    Location
    Wales
    Posts
    3,594
    Tokens
    1,387
    Habbo
    Skizzling

    Latest Awards:

    Default

    http://habbotbh.com/avatar/index.png

    It's just displaying text..

    +Rep for helping btw.

  4. #4
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    7,554
    Tokens
    0

    Latest Awards:

    Default

    What is your PHP code?

  5. #5
    Join Date
    Jul 2004
    Location
    Ottawa, Canada
    Posts
    1,363
    Tokens
    106
    Habbo
    Yonder

    Latest Awards:

    Default

    .htaccess file in the /avatar/ directory:

    RewriteEngine on
    RewriteRule index.png index.php

  6. #6
    Join Date
    Jan 2008
    Location
    Wales
    Posts
    3,594
    Tokens
    1,387
    Habbo
    Skizzling

    Latest Awards:

    Default

    Quote Originally Posted by Yonder View Post
    .htaccess file in the /avatar/ directory:
    That works, thanks! +rep.

    And sorted now Blinger, I think i've +repped you?

  7. #7
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    7,554
    Tokens
    0

    Latest Awards:

    Default

    Yes you have. Sorry, i assumed you knew to put the .htaccess file into the /avatar/ folder.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •