How to extract search result count from search engines
Hi everyone, I'm a newbie here, not only to this forum but also to PHP, and I need your help!
Recently I got a task on extracting search result count from search engines and store the search word, date, and result count somewhere, when needed importing the data to excel.
I'm thinking about using PHP+MySQL for this purpose. Honestly I don't know how to start . Do you know any PHP scripts out there already available that I can use as a start point? Or do you have the script you can share with me?
Any tips and advice will be greatly appreciated!
There's several ways to approach this, of course. Essentially, you read the server log file and check the REFERER field for traffic from the search engines. When you locate an entry, you need to parse the REFERER's query string for the user search query. From there, it's up to you to decide what to do with that information. For several reasons, I'd suggest that you filter out common words like "the", "a", "an", "who", "what", "where", "if" "and", "but", etc. so that you don't needlessly track them as individual keywords. Then you need to decide if you want to track entire search queries, or just the individual keywords. As I say, there's lots of ways to do this. The best thing is to just dig in and see how it goes for your project. I'm sure you can find server log parsing scripts out there to get you started. Good luck!
Thanks for the tip! Although I think I may not describe my question correctly. The data I want to scrap is the search result count. Say I search "Adele" (my current favorite singer ) on Google, then I get "About 85,100,000 results (0.34 seconds)" on the search result page. The number 85,100,000 is the one I want to get. I checked REFERE and for my understanding, it would be good for visit count, am I correct?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)