How would I search for a string that is on a external webpage using like egrep and curl or something. I then need it to perform an If else function...If found echo "found" else echo "not found"...
Thanks
Printable View
How would I search for a string that is on a external webpage using like egrep and curl or something. I then need it to perform an If else function...If found echo "found" else echo "not found"...
Thanks
try this one.
PHP Code:
$content = strip_tags(file_get_contents($URL));
if (strstr($content,$word)) {
echo 'found';
}
else {
echo 'not found';
}