Scraping from a website.

Discussion in 'PHP' started by Loryman, May 26, 2007.

  1. #1
    Hey, Im rather new with PHP and I was just wondering how it would be possible to scrape the Display name/default picture of a myspace.com user?
    What I'm after is a form that asks the user for a friend ID, so once the user types in their friend ID and hits the submit button, the code will go through their profile source to find their display name and default picture, to then display them.

    I've tried to come up with something myself, without success.

    All I know is the Display name is in this code.
    And the default picture is in this.
    Please help if you can, thanks!
     
    Loryman, May 26, 2007 IP
  2. Kalyse

    Kalyse Peon

    Messages:
    1,221
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There is a class on phpclass.org that does exactly this. You enter the $starttag and the $endtag and it will scrape anything in between for you.

    Go onto PHPClasses and type in curl and you will find lots. Im not entirely sure which one it is but I used it last week
     
    Kalyse, May 26, 2007 IP
  3. coderbari

    coderbari Well-Known Member

    Messages:
    3,168
    Likes Received:
    193
    Best Answers:
    0
    Trophy Points:
    135
    #3
    coderbari, May 27, 2007 IP