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 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jan 2007
    Location
    West Yorkshire
    Posts
    384
    Tokens
    0

    Default MySpace Current Picture

    I was like just messing around with PHP and explode etc and decided to make this script.

    PHP Code:
    <?php
    function MySpacePicture($name){

    $data file_get_contents("http://myspace.com/".$name);

    $linkstart explode('<a id="ctl00_Main_ctl00_UserBasicInformation1_hlDefaultImage"'$data);
    $linkend explode('</a>'$linkstart[1]);
    $link trim($linkend[0]);

    $imagestart explode('<img src="'$link);
    $imageend explode('" border="0" />'$imagestart[1]);
    $image trim($imageend[0]);

    return 
    $image;

    }

    ?>
    It just gets the current picture for the given MySpace account.

    Here is an example of using it with The Fratellis' MySpace. Lets say you saved the code in myspace.php

    PHP Code:
    <?php
    include('myspace.php');
    echo 
    '<img src="' MySpacePicture("littlebabyfratelli") . '">';
    ?>
    http://thomas.uk.to/myspace.php

    I dont know why I created this, probably because I never know what to make.

    “two players, two sides.
    one is light, one is dark.”
    - John Locke

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

    Latest Awards:

    Default

    I just thought of doing that too

  3. #3
    Join Date
    Jan 2007
    Location
    West Yorkshire
    Posts
    384
    Tokens
    0

    Default

    I dont know why I did, I never use MySpace

    “two players, two sides.
    one is light, one is dark.”
    - John Locke

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

    Latest Awards:

    Default

    Hmm whats another site.. we could make something with...

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

    Latest Awards:

    Default

    Make it so you can get a msn picture lol

  6. #6
    SAMURAl555 Guest

    Default

    see if ya cn do summit with bebo

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

    Latest Awards:

    Default

    Im trying bebo now but i need thomas to help

  8. #8
    Join Date
    Jan 2007
    Location
    West Yorkshire
    Posts
    384
    Tokens
    0

    Default

    Yeah i was looking at Bebo, but I couldnt find anything 'unique' that surrounds the profile image if you get what I mean.
    EDIT:// Actually, I have just found something.
    Last edited by ZAG; 17-02-2007 at 03:29 PM.

    “two players, two sides.
    one is light, one is dark.”
    - John Locke

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

    Latest Awards:

    Default

    PHP Code:
    <?php
    $name 
    "1447801758";
    $data file_get_contents("http://www.bebo.com/Profile.jsp?MemberId=".$name);


    $album "PhotoAlbums.jsp?ProfilePhoto=Y&MemberId=".$name."";
    echo 
    $album;
    $linkstart explode('<a href=$album>'$data);
    $linkend explode('</a>'$linkstart[0]);
    $link trim($linkend[0]);

    echo 
    $link;

    ?>
    Ive got it to give the link in between the <a href= but i cant get the damn <img src

  10. #10
    Join Date
    Jan 2007
    Location
    West Yorkshire
    Posts
    384
    Tokens
    0

    Default

    I fixed your code and put it into a function

    PHP Code:
    <?php
    function BeboPicture($memberid){
    $data file_get_contents("http://www.bebo.com/Profile.jsp?MemberId=".$memberid);

    $imagestart explode('<a href=PhotoAlbums.jsp?ProfilePhoto=Y&MemberId='.$memberid.'><img src='$data);
    $imageend explode(' border=0'$imagestart[1]);
    $image trim($imageend[0]);

    return 
    $image;
    }
    ?>
    You would use it like
    PHP Code:
    <?php
    include('bebo.php'); //Lets say you saved the code in bebo.php
    echo '<img src="' BeboPicture(1447801758) . '">';
    ?>
    Heres an example:

    http://thomas.uk.to/bebo.php?id=1447801758

    “two players, two sides.
    one is light, one is dark.”
    - John Locke

Page 1 of 2 12 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
  •