gabrieldjones Posted September 18, 2012 Share Posted September 18, 2012 Hi guys and girls, I'm trying to create a php script that will search a specific website for keywords I've entered. Essentially, I'm trying to make a page that has two text inputs: 1. website URL 2. keywords And naturally then a search button. When the search button is clicked, the entered URL will be searched for the keywords that were provided. I'm pretty new to PHP and this seems a bit beyond me. Quote Link to comment https://forums.phpfreaks.com/topic/268496-searching-specific-websites/ Share on other sites More sharing options...
kicken Posted September 18, 2012 Share Posted September 18, 2012 You'd want to use cURL or file_get_contents to download the source for the URL entered. Once you have the source in a string, searching it depends on how advanced of a search you want to do. strpos would allow you do a quick and simplistic search. Quote Link to comment https://forums.phpfreaks.com/topic/268496-searching-specific-websites/#findComment-1378821 Share on other sites More sharing options...
gabrieldjones Posted September 18, 2012 Author Share Posted September 18, 2012 Thanks a lot for your help! I'm essentially trying to create a website that searches specific news sites for issues I'm interested in. The keywords would be related to one specific issue and the output would be links to articles on that site mentioning that interest. Quote Link to comment https://forums.phpfreaks.com/topic/268496-searching-specific-websites/#findComment-1378823 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.