J
J
jScheq2016-07-14 12:16:02
PHP
jScheq, 2016-07-14 12:16:02

PHP - how to turn an HTML string with tags into a regular string?

5fa9a2c3ea16449883bfb7642b7c7e91.PNG
There are ips, but they are veiled with a bunch of random spans, divs and all sorts of other garbage. It is necessary to isolate the ip itself without the rest of the garbage.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Osher, 2016-07-14
@miraage

1) get a collection of elements by splitting on the BR tag
2) for each element do window.getComputedStyle(elem)
3) check display:none, visibility:hidden, opacity:0, position:absolute/fixed etc to filter out garbage

A
Andrzej Wielski, 2016-07-14
@wielski

Google towards php simple html dom , namely you want the plaintext of the entire page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question