How to seach the whole website?

this is a code that gets the link of the video from a website of one page

$html = file_get_contents('');
if (preg_match('/<param name="movie".*/', $html, $matches)) {
  echo "1- Match was found <br />";
  echo $matches[0];

i would like to make it search such contents from the whole website not just
any idea how to do that???

Not easy using the method that youve got there, youd have to loop through each page of the site checking for a match.

Searches are usually carried out when the content is held in a database, thats a much better and easier method.