Page 5 of 6 FirstFirst 123456 LastLast
Results 41 to 50 of 53
  1. #41
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    Yea one sec.

    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);

    $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;

    ?>

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

    Latest Awards:

    Default

    TOP Bloke Ta!
    EDTALKING


  3. #43
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    Glad I could help. If you need anything else reply
    Kevin

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

    Latest Awards:

    Default

    Lol dragging this post on

    Is there a way for it to show eg "noart.jpg" when a dj is using a custom $combine$ thing in sam or when last.fm doesnt have the artist instead of showing:

    Warning: file_get_contents(http://www.last.fm/music/Ed//+My+Chemical+Romance/) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /home/anyhabbo/public_html/albumart.php on line 10
    >
    EDTALKING


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

    Latest Awards:

    Default

    I think you can use "or", but you'll have to write it into the code yourself:

    PHP Code:
    file_get_contents("artist") or echo "<img src='noart.jpg' />"



    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)


  6. #46
    ScottDiamond Guest

    Default

    Would else and echo not work?

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

    Latest Awards:

    Default

    Quote Originally Posted by ScottDiamond View Post
    Would else and echo not work?


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

    Latest Awards:

    Default

    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); 
    file_get_contents("artist") or 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
    ?>
    Correct?
    EDTALKING


  9. #49
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by NintendoNews View Post
    I think you can use "or", but you'll have to write it into the code yourself:

    PHP Code:
    file_get_contents("artist") or echo "<img src='noart.jpg' />"
    Wouldnt it be
    PHP Code:
    if(!file_get_contents($url)) {
    echo 
    "<img src='noart.jpg'>";


  10. #50
    Join Date
    Apr 2006
    Location
    wolvo init lol.
    Posts
    2,272
    Tokens
    0

    Latest Awards:

    Default

    Umm,

    why have I got this?
    PHP Code:
    Warningfsockopen() [function.fsockopen]: php_network_getaddressesgetaddrinfo failedName or service not known in /home/teamstea/public_html/habbobuzz/imagestats.php on line 13

    Warning
    fsockopen() [function.fsockopen]: unable to connect to :(Unknown errorin /home/teamstea/public_html/habbobuzz/imagestats.php on line 13
    is Offline 
    Line 13 is:
    $scfp = fsockopen("$scip", $scport, &$errno, &$errstr, 30);

Page 5 of 6 FirstFirst 123456 LastLast

Posting Permissions

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