G
G
Good Samaritan2018-02-11 10:27:17
PHP
Good Samaritan, 2018-02-11 10:27:17

How to get content between head tags of another site?

You need to use the SIMPLE HTML DOM to get the content of the site's head tag. I do so

foreach ($html->find("head") as $elements) {
  $categories = $elements;
}
echo $categories;

Displays only up to the end of the title tag and stops there.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question