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

Thread: More PHP Help

  1. #1
    Join Date
    Jan 2006
    Location
    Cambridge
    Posts
    1,911
    Tokens
    0

    Latest Awards:

    Default More PHP Help

    Anyone know what is wrong with this?

    PHP Code:
    <?php 
    header
    ("Content-Type: image/gif"); 
    $artist $_GET['artist']; 
    $artist urldecode($artist); 
    $url "http://www.last.fm/music/" $artist "/"
    $url eregi_replace(" ""+"$url); 
    $data file_get_contents($url); 
    if(!
    file_get_contents($url)) {
    echo 
    "<img src='noart.jpg'>";
    }    
    $image1start explode('<div class="imgHolder">'$data); 
    $image1end explode('</div>'$image1start[1]); 
    $image1 trim($image1end[0]); 
    $imagestart explode('<img src="'$image1); 
    $imageend explode('" alt'$imagestart[1]); 
    $image trim($imageend[0]); 
    echo 
    $image
    ?>
    Its supposed to show the bands last.fm image because i couldnt do album art

    PHP Code:
    //display stats
    if($streamstatus == "1"){
    //you may edit the html below, make sure to keep variable intact
    $name explode(" - "$song[0]);
    $sname explode($song[0], " - ");
    $sartist $sname[0];
    $artist $name[0];
    $url "album.php?artist=$artist";
    $url eregi_replace(" ""+"$url);
    $thing file_get_contents($url);
    echo(

    And also, i've managed to get the song artist seperate using $artist but how do i get the song name seperate using $sartist?
    Cheers -Ed
    Last edited by :Edzy; 01-06-2008 at 11:30 PM.
    EDTALKING


  2. #2
    Join Date
    Jan 2006
    Location
    Cambridge
    Posts
    1,911
    Tokens
    0

    Latest Awards:

    Default

    Sorry about double post

    addition:

    how do i remove the t_string error from

    PHP Code:
    <img src="$thing"
    EDTALKING


  3. #3
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    <img src=\"" . $thing. "\">
    How could this hapen to meeeeeeeeeeeeeee?lol.

  4. #4
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    $string = '<img src="' . $thing . '">';

    Single quotes are better.
    Hi, names James. I am a web developer.

Posting Permissions

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