Advertisement
kremisoski

Search Website For String

Feb 3rd, 2015
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1. <?php
  2.  
  3. $link = "http://www.somesite.com";
  4. $ch = curl_init($link);
  5. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  6. $page = curl_exec($ch);
  7. $search = strpos($page, "YOUR_SEARCH_STRING");
  8.  
  9. if ($search == false) {
  10.     echo "no";
  11. } else {
  12.     echo "yes";
  13. }
  14.  
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement