I want to create php script that search the web for specific pages that contains "travel to europe" and get officials email addresses from that pages. How can i do that and what tools do you recommend?
Asked
Active
Viewed 4,289 times
-2
-
2How broad is too broad? This question. Show us the code you tried. Plus, your question is kind of ironic. – Funk Forty Niner Jun 23 '15 at 20:05
-
There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.I would suggest that you find a development forum (perhaps [quora](http://www.quora.com/Computer-Programming)?) to work out generalities. Then, when you have specific coding issues, come back to StackOverflow and we'll be glad to help. – Jay Blanchard Jun 23 '15 at 20:07
-
*The irony of this question, eh Sam?* - @JayBlanchard – Funk Forty Niner Jun 23 '15 at 20:07
-
*Or is it just facetious Ralph?* @Fred-ii- – Jay Blanchard Jun 23 '15 at 20:10
1 Answers
1
You can use some pointers from this answer - How do I make a simple crawler in PHP?
BUT - do you really want to crawl ALL the web? Well, you are asking the question on where to start - do you know how big the web is, and how many resources - compute, storage, would you need?
An alternative is to use google search API - search for ""travel to europe" using Google API. Hopefully Google has done good enough job to "search the web for pages containing foo". Now that you have a set of pages, do curl get on those pages and parse for information that you are looking for.
-
I found https://github.com/liip/LiipSearchBundle . I use Symphony 2 framework so maybe this is good solution? – sanof Jun 23 '15 at 20:35
-
Google API is simple enough that you do not need anything on top of that. I do not have it handy, but the code to search using Google APIs is really small. – Amit Jun 23 '15 at 20:36