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 2 of 2

Thread: PHP Help

  1. #1
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default PHP Help

    Well i'm in a bit of a fix, I think my brain died!

    I'm looking into saving a remote file (image) onto my server.

    PHP Code:
    <?php
    $file 
    $_GET["file"];
    if(
    $file == "") {
        exit(
    "<h1>ERROR!</h1> You left a required field blank!");
    }

    $image = @file_get_contents($file);

    if(
    $image == false) {
        exit(
    "<h1>ERROR!</h1> 404.  File not found!");
    } else {
        
    // Code here
    }
    I need a way to check and see if the remote file is an image though. In Jaxer I just do:

    fileInfo.contentType.indexOf('image') == 0

    Any ideas?

  2. #2
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Nevermind! Solved. Thanks Blob

Posting Permissions

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