1

Can you enlighten me with your knowledge about cURL? I tried cURL but the output of the function is it copies the whole site. I plan to just gather all the search results of that site.

How can I achieve this?

j0k
  • 22,600
  • 28
  • 79
  • 90

1 Answers1

2

I guess the format of the page you are retrieving is HTML or XML; please look at this answer for good ways in PHP to parse an HTML/XML page: How do you parse and process HTML/XML in PHP?

Beware that some HTML pages might be dynamic, using JavaScript to build the actual result page, maybe even doing so in ajax. The static html/xml page you get with cURL might not contain the information you want!

Community
  • 1
  • 1
Stefano
  • 18,083
  • 13
  • 64
  • 79