3 Replies - 1902 Views - Last Post: 29 October 2011 - 03:39 PM Rate Topic: -----

#1 maria_six  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 24
  • Joined: 28-September 11

how to: Scraping website content with PHP using URL?

Posted 28 October 2011 - 06:25 PM

how to: Scraping website content with PHP using URL?

Attached Image
Is This A Good Question/Topic? 0
  • +

Replies To: how to: Scraping website content with PHP using URL?

#2 codeprada  Icon User is offline

  • Changed Man With Different Priorities
  • member icon

Reputation: 948
  • View blog
  • Posts: 2,357
  • Joined: 15-February 11

Re: how to: Scraping website content with PHP using URL?

Posted 28 October 2011 - 07:23 PM

You must first retrieve the HTML and then use a XML parser to get data from the content element. You have the choice of using cURL or going a bit low level by using sockets to retrieve the HTML. To parse the XML or HTML retrieved you can use DOM, SimpleXML or any other XML manipulation object PHP has to offer.
Was This Post Helpful? 1
  • +
  • -

#3 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10785
  • View blog
  • Posts: 40,160
  • Joined: 27-December 08

Re: how to: Scraping website content with PHP using URL?

Posted 29 October 2011 - 02:14 PM

It looks like you are trying to scrape Facebook. Why not just use the Facebook API?
Was This Post Helpful? 0
  • +
  • -

#4 VolcomMky  Icon User is offline

  • D.I.C Regular

Reputation: 74
  • View blog
  • Posts: 315
  • Joined: 13-May 09

Re: how to: Scraping website content with PHP using URL?

Posted 29 October 2011 - 03:39 PM

Is that just an example?
Like showing us that you want it to work like Facebook's?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1