hi,
I am trying to write a script which can do the following. I do not have any idea of how to write it ..but have the idea of how it should/will work.
I have a list of words in an mysql db(almost 1000 words). I need to take each word and then put in the search query of any search engine(for example ask.com) and store the result that appears under "related words"/"suggested words"/"narrow your search words" in a file.
Example:
If you search for the word "forum" in ask.com, we can see the url as
forum - Ask.com Web Search
and the search result page contains "Narrow Your Search"
Roman Forum
Free Forum
..
...
etc.
So I need to write a script that can take word by word from my mysql db and put it in the url (as below) and then store only the "result under "Narrow your search result" in a file.
Ask.com Search Engine - Better Web Searchnextword&search=search&qsrc=0&o=0&l=dir
Please let me know if its something possible and if I can have look at any examples..I would need to complete this as soon as possible.
I can explain it in a more better way if the above explanation is not clear.
Regards
This sounds possible. First "select" all of the words from your database and do a loop. I recommend using MySQLi if you have it installed. I wrote a blog on it here: PHP MySQL Improved
Next you'll use Curl to emulate a browser and connect to the search engine submitting the keyword you extracted from the database. From there you can retrieve the data and modify it how you like.
Curl will return the contents of the website, he will just need to assign it to a string.
lol. Also, there is no getch() function in PHP. There is ncurses_getch although it is experimental.
Nope, unless it was custom made.
You can use that with regular expressions to extract most of the HTML data you would need.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks