PHP: Check Website for Certain Text

For fun, I wanted to build a PHP script that checked a website to see if an item was in stock. I wanted the script to grab all the HTML on a web page and check to see if the words “Out of Stock” were anywhere on the page. Initially, I thought this would take a lot of work. But PHP makes it pretty easy with the use of the file_get_contents function. Here is an example of how I used it.

Continue reading “PHP: Check Website for Certain Text”