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!


Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Jul 2005
    Posts
    1,653
    Tokens
    50

    Latest Awards:

    Default

    It's simple, it's just the regex pattern thats tricky.
    irc.freenode.net #regex

    They'll help you out though

  2. #12
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by RYANNNNN View Post
    It's simple, it's just the regex pattern thats tricky.
    irc.freenode.net #regex

    They'll help you out though
    /background-image: url\((.*?)\);/i should do it i think


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

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

    Latest Awards:

    Default

    Something like this Jack?

    http://79.64.224.188:1337/jack.php

  4. #14
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Quote Originally Posted by Invent View Post
    Something like this Jack?

    http://79.64.224.188:1337/jack.php
    Damn! You beat me! My script was nearly ready it was just displaying them all wrong. Damn lol

  5. #15
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by Invent View Post
    Something like this Jack?

    http://79.64.224.188:1337/jack.php
    Exactly like that

  6. #16
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Jack120 View Post
    Exactly like that
    PHP Code:
    <?php
    $url 
    file_get_contents("http://www.habbo.co.uk/myhabbo/styles/assets.css");
    $look4 "/background-image: url\((.*?)\);/";
    preg_match_all($look4$url$images);
    $echo implode('<br> '$images[1]);
    echo 
    "$echo";
    ?>
    That should work

    EDIT: and if you want to display the number of images.

    PHP Code:
    <?php
    $url 
    file_get_contents("http://www.habbo.co.uk/myhabbo/styles/assets.css");
    $look4 "/background-image: url\((.*?)\);/";
    preg_match_all($look4$url$images);
    $echo implode('<br> '$images[1]);
    echo 
    "$echo";
    echo 
    "<hr>There are currently ";
    $number preg_match_all($look4$url$images);
    echo 
    "$number";
    echo 
    "images/backgrounds";
    ?>
    EDIT AGAIN: if you want to view the images on the page:

    PHP Code:
    <?php
    $url 
    file_get_contents("http://www.habbo.co.uk/myhabbo/styles/assets.css");
    $look4 "/background-image: url\((.*?)\);/";
    preg_match_all($look4$url$images);
    $echo implode('<br> '$images[1]);
    echo 
    "$echo";
    echo 
    "<hr>There are currently ";
    $number preg_match_all($look4$url$images);
    echo 
    "$number";
    echo 
    " images/backgrounds";
    echo 
    "<hr>";
    $tochange  "$echo";
    $start = array("http""gif""png""jpg");
    $replace   = array("<img src=http""gif>""png>""jpg>");
    $htmlimages str_replace($start$replace$tochange);
    echo 
    "$htmlimages";
    ?>
    Last edited by Decode; 05-04-2008 at 04:22 PM.
    Lets set the stage on fire, and hollywood will be jealous.

  7. #17
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by Tom743 View Post
    PHP Code:
    <?php
    $url 
    file_get_contents("http://www.habbo.co.uk/myhabbo/styles/assets.css");
    $look4 "/background-image: url\((.*?)\);/";
    preg_match_all($look4$url$images);
    $echo implode('<br> '$images[1]);
    echo 
    "$echo";
    ?>
    That should work

    EDIT: and if you want to display the number of images.

    PHP Code:
    <?php
    $url 
    file_get_contents("http://www.habbo.co.uk/myhabbo/styles/assets.css");
    $look4 "/background-image: url\((.*?)\);/";
    preg_match_all($look4$url$images);
    $echo implode('<br> '$images[1]);
    echo 
    "$echo";
    echo 
    "<hr>There are currently ";
    $number preg_match_all($look4$url$images);
    echo 
    "$number";
    echo 
    "images/backgrounds";
    ?>
    EDIT AGAIN: if you want to view the images on the page:

    PHP Code:
    <?php
    $url 
    file_get_contents("http://www.habbo.co.uk/myhabbo/styles/assets.css");
    $look4 "/background-image: url\((.*?)\);/";
    preg_match_all($look4$url$images);
    $echo implode('<br> '$images[1]);
    echo 
    "$echo";
    echo 
    "<hr>There are currently ";
    $number preg_match_all($look4$url$images);
    echo 
    "$number";
    echo 
    " images/backgrounds";
    echo 
    "<hr>";
    $tochange  "$echo";
    $start = array("http""gif""png""jpg");
    $replace   = array("<img src=http""gif>""png>""jpg>");
    $htmlimages str_replace($start$replace$tochange);
    echo 
    "$htmlimages";
    ?>
    Thank you.

    Do you know how to:
    1) Make it so that the image is saved into a local direcotry
    2) Save the IMG name, it it gets rid of " http://img2.cdn1.habbo.com/c_images/stickers/" and just inserts filename.gif into a database?

Page 2 of 2 FirstFirst 12

Posting Permissions

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