D
D
dzhavadov2014-06-05 20:55:40
PHP
dzhavadov, 2014-06-05 20:55:40

PHP Simple HTML DOM Parser how to get background?

When parsing a page, the h1 header has a style that sets the background image. The style itself on each page is different and is written in the header. Here is an example

<style type="text/css">
#Header h1 {width:287px; height:56px; background:url(http://www.zappos.com/boutiques/183/franco-sarto_head050214.jpg); n;}
</style>

Can I get it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stepan, 2014-06-05
@L3n1n

Pull out a regular expression.. Or there are special CSS parsers of the same type..
Simple HTML DOM Parser is geared more towards parsing ... than the above.

V
Vitaly Zheltyakov, 2014-06-05
@VitaZheltyakov

PHP Simple HTML DOM Parser, as I remember, does not process the content of styles.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question