xzenon Posted December 22, 2015 Share Posted December 22, 2015 Hi Is it possible to make a scripte that looks up words on diffrent site pages? Quote Link to comment https://forums.phpfreaks.com/topic/299961-script-that-looks-up-words-on-other-site-page/ Share on other sites More sharing options...
xzenon Posted December 22, 2015 Author Share Posted December 22, 2015 opps sorry double posts. Quote Link to comment https://forums.phpfreaks.com/topic/299961-script-that-looks-up-words-on-other-site-page/#findComment-1528463 Share on other sites More sharing options...
Psycho Posted December 22, 2015 Share Posted December 22, 2015 [i removed the other post] Yes, it is possible. "How" you do it would depend on the structure of the page and how the word exists in the page. For example, if the word you are looking for is "car" you wouldn't want to just look for those three letters in succession. Otherwise you would find "carpet" as well. Perhaps the word you are looking for would be contained within a DIV on the page. If so, then you would write the code to look specifically for that div and within the div for the content. This is typically referred to as screen-scraping. Depending upon what you are doing and how you use that information, you may be violating copyrights or terms of use for the site in question. At worst it could be illegal. It may just be immoral/bad etiquette. Or, if the owner/author is OK with it and you are not reusing the content and presenting it as your own, then it might be OK. Bottom line - tread carefully. Quote Link to comment https://forums.phpfreaks.com/topic/299961-script-that-looks-up-words-on-other-site-page/#findComment-1528464 Share on other sites More sharing options...
xzenon Posted December 22, 2015 Author Share Posted December 22, 2015 (edited) Hi Psycho Its a very simple site on my arduino who i want to scrap as you call it. so im not going to violate any laws. The words on the arduino site exists on the first row. the function i want is the script looks for a word if that word is there it will print a message on my page. Edited December 22, 2015 by xzenon Quote Link to comment https://forums.phpfreaks.com/topic/299961-script-that-looks-up-words-on-other-site-page/#findComment-1528465 Share on other sites More sharing options...
Psycho Posted December 22, 2015 Share Posted December 22, 2015 What do you mean by "the first row"? Are you saying there is an HTML table on the page and the word would exist within the first TR instance? If so, does it exist within a specific TD instance in that row (e.g. the first, second, third, etc.). Is the word the only thing in the TD container or is there other content? What are the other potential words that might be in that same place? There are too many variables for me to provide a solution without knowing more. Provide a sample of the HTML code where the word exists and the word you are looking for and I can give you something. Quote Link to comment https://forums.phpfreaks.com/topic/299961-script-that-looks-up-words-on-other-site-page/#findComment-1528470 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.