Results 1 to 9 of 9
  1. #1
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default [PHP] Making a script show as an image

    Right, well i got this thing off habboring for habbofunctions.

    Does anyone know how to make it show up as an image?

    for example..

    www.habbo-center.com/habbo/image.php?name=lost_witness
    works.

    yet

    doesnt.

    Thanks for any help.
    Coming and going...
    Highers are getting the better of me

  2. #2
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Im guessing the main problem is due to it haveing a .php exstention - which stops forum parsing it. Although for a normal html embed i would have expected it to work... maybe the rediret it uses is whats causeing the problem?? or another possiblty is if hotlink protection is enabled.
    Last edited by Mentor; 15-06-2007 at 07:05 PM.

  3. #3
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    it doesnt work on habbo-center servers either. So its nothing to do with hotlink protection,, which is disabled anyways..
    Coming and going...
    Highers are getting the better of me

  4. #4
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Make a file called Habbo.php, inside it put:

    PHP Code:
    <?php

    if($_GET['name'] && !empty($_GET['name'])) {
    $contents file_get_contents"http://www.habbo-center.com/habbo/image.php?name="

    $_GET[name] ."" );

    $contents explode("<img src=\"http://www.habbo.co.uk/habbo-imaging/avatar/"$contents);

    $contents str_replace("\">"""$contents[1]);

    echo(
    "http://www.habbo.co.uk/habbo-imaging/avatar/"$contents ."");
    }
    ?>
    Then do:

    That MIGHT work.

    Or just do htaccess
    Last edited by Invent; 15-06-2007 at 07:28 PM.

  5. #5
    Join Date
    Aug 2006
    Location
    United Kingdom
    Posts
    3,843
    Tokens
    1,121

    Latest Awards:

    Default

    could jus right click n go to properties



    but if you need them all showing up in the url then Id go with Simons post

  6. #6
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    k, ive done it a diff way (just putting an iframe to the display page and declaring the variable in that.)

    http://www.habbo-center.com/v6/staff.php if u wanna see it..

    Any suggestions to improve it?

    Later, im going to do categorys to narrow down the search..
    Coming and going...
    Highers are getting the better of me

  7. #7
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    3,285
    Tokens
    0

    Latest Awards:

    Default

    It's because on the actual function, it is making a page with the image displayed on it, instead of simply outputting the image as most do.



    i used to be NintendoNews. visit my blog or add me on twitter.
    need help with vista? i am a microsoft certified technology specialist in configuring windows vista and connected home integrator.. pm me for help!


    "I am the way, the truth, and the life. No one comes to the Father except through me"
    John 14:6 (NIV)


  8. #8
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    Nope, that not wokring invent..

    NinetndoNews - Do you know the code to make it so it just displays the image?

    as the iframe version ive resorted to has a very slow load time.
    Coming and going...
    Highers are getting the better of me

  9. #9

    Default

    make a file called .htaccess

    with this in
    Code:
    Options +Indexes
    RewriteEngine on
    RewriteRule ^staff/(.*).png$ image.php?name=$1
    and then put that in the directory that image.php is in then for the image it will be
    http://www.habbo-center.com/habbo/staff/staffname.png

    it will load
    http://www.habbo-center.com/habbo/im...name=staffname

Posting Permissions

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