I am wondering if there is any kind of command in PHP that will search a web page for a certain word, and then confirm whether or not the word was found. For example, say I wanted to find the word "ebay" on www.ebay.com, the script would look for it, and then it would come back and tell me, yes, the word ebay is on www.ebay.com! Or, if I wanted to find the word "Microsoft" on a linux enthusiast website, it would search the site, and come back and tell me hey, the word "microsoft" was not found on that linux enthusiast site.. So, is there any special command or whatnot that would allow me to do this?
Ok I have figured out that its cURL. And there is a way to do it so the site thinks its a google bot. I am willing to hire someone to make me a script like what I described in my first post, using cURL
use also preg_match_all f.e. preg_match_all('/(\d+)/', $page, $wynik ); just change (\d+) <- this is for numbers and then if $wynik[0][$n] ($n++) is equal to ebay
No need for preg_match_all() and looping. Here's an example: $url = 'http://www.ebay.com'; $query = 'ebay'; $case_insensitive = true; if ($source = @file_get_contents($url)) { if (preg_match(sprintf('~%s~%s', preg_quote($query, '~'), $case_insensitive ? 'i' : ''), $source)) { echo 'Found'; } else { echo 'Not found'; } } PHP: