-1

$text = file_get_contents("http://127.0.0.1/name.php?name=Lary");

I want to use it to get only the text, not the html.

l.g.karolos
  • 1,131
  • 1
  • 10
  • 25

1 Answers1

1

Try this I haven't tested yet.

$html = file_get_contents("http://127.0.0.1/name.php?name=Lary");

$text = strip_tags($html);

echo ($text);

More info here: strip_tags

l.g.karolos
  • 1,131
  • 1
  • 10
  • 25