psunshine Posted August 2, 2008 Share Posted August 2, 2008 Hi, This may seem like something simple to do for some but I for the life of me cannot get my head around it! Basically I want to be able to enter a list of keywords and retrieve the top 3 urls (from google for example) for each keyword seperately. Is this something that can be acheived with curl and php or something similar? If anyone has any ideas or direction it would be much appreciated. Thanks P Link to comment https://forums.phpfreaks.com/topic/117781-batch-search-from-list-of-keywords/ Share on other sites More sharing options...
psunshine Posted August 2, 2008 Author Share Posted August 2, 2008 Any ideas?? Link to comment https://forums.phpfreaks.com/topic/117781-batch-search-from-list-of-keywords/#findComment-605990 Share on other sites More sharing options...
JasonLewis Posted August 2, 2008 Share Posted August 2, 2008 Well I don't know much about cURL. But let's get this straight. You want people to be able to enter some keywords on your site. Those keywords are sent to googles search via cURL then the first 3 results on the page are displayed to the user on your website? Correct? Link to comment https://forums.phpfreaks.com/topic/117781-batch-search-from-list-of-keywords/#findComment-605992 Share on other sites More sharing options...
psunshine Posted August 2, 2008 Author Share Posted August 2, 2008 It doesnt have to be curl, preferably whatever would be the best solution, im flexible. I want it to do the search for each keyword/keywords seperately and then the top x amount of results for each are displayed. So example input would be: football david beckham cricket hockey Results like this: football david beckham - en.wikipedia.org/wiki/David_Beckham , www.thefa.com/England/SeniorTeam cricket - en.wikipedia.org/wiki/Cricket , www.thecricket.nu hockey - www.nhl.com/ , en.wikipedia.org/wiki/Ice_hockey So you basically end up with a new line seperated batch google search with comma seperated results (or similar!). Link to comment https://forums.phpfreaks.com/topic/117781-batch-search-from-list-of-keywords/#findComment-605996 Share on other sites More sharing options...
LemonInflux Posted August 2, 2008 Share Posted August 2, 2008 This is just regex. Go to the appropriate url, and use regex to pull the data. Link to comment https://forums.phpfreaks.com/topic/117781-batch-search-from-list-of-keywords/#findComment-606008 Share on other sites More sharing options...
psunshine Posted August 2, 2008 Author Share Posted August 2, 2008 In what way do you mean lemon? I want to create an automated script thats run on site to acheive this. If you could give a bit more of a pointer or example I would be happy to hear. Link to comment https://forums.phpfreaks.com/topic/117781-batch-search-from-list-of-keywords/#findComment-606242 Share on other sites More sharing options...
LemonInflux Posted August 2, 2008 Share Posted August 2, 2008 google URLs are like this: google.com/search?q=keywords All you need to do is file_get_contents(that_url) and use regular expressions to parse out the data. ---------------- Now playing: Dance Gavin Dance - It's Safe to Say You Dig the Backseat via FoxyTunes Link to comment https://forums.phpfreaks.com/topic/117781-batch-search-from-list-of-keywords/#findComment-606249 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.