1

I use file_get_contents("http://www.mydomain.com"); to get the content. Then I need to search through it for a word and return the whole line where the word is found. Is this possible?

Daniel Tovesson
  • 2,550
  • 1
  • 30
  • 41

1 Answers1

2

Iterate over each line in content.

Use strpos to check if line contains word that you are looking for.

Community
  • 1
  • 1
Jarosław Gomułka
  • 4,935
  • 18
  • 24