Questions tagged [simple-html-dom]

Simple HTML DOM is an open source HTML DOM parser written for PHP5+ which lets users easily manipulate HTML.

PHP Simple HTML DOM Parser is an open source project created by S.C. Chen, based on the HTML Parser for PHP 4. It's a PHP 5+ HTML DOM parser class which helps with HTML elements manipulation.

The parser is not limited to valid HTML and can also parse HTML code that did not pass W3C validation. Document objects can be found using selectors, similar to what is possible with .

Elements can be targeted with simple selectors. DOM elements can also be added, deleted or altered. Simple HTML DOM is appropriate for simple tasks but lacks support for many CSS selectors and leaks memory (see manual).

More information on the SourceForge project's page.

1672 questions
5
votes
1 answer

Login to Opencart's admin with curl of PHP

I want to login to OpenCart CMS with curl automatically and add things to it automatic toobut I can't login to it.I searched and found some result but couldn't help me and I don't get any result. This is my code:
MEAM
  • 61
  • 8
5
votes
1 answer

Simple HTML DOM - Child Selectors (CSS)

I am trying to select a (direct) child of parents div.element using the > combinator, but it's failing. HTML:

test

test2

RisingSun
  • 1,693
  • 27
  • 45
5
votes
1 answer

Reverse image scraping with PHP

I need to fetch some images using google Reverse image search which is not supported by the API, but thankfully, you can query google with a direct link to the image and it still shows results, so: $googleURL =…
eozzy
  • 66,048
  • 104
  • 272
  • 428
5
votes
3 answers

Simple dom php parse get custom data attribute value

HTML:
ddsf PHP: foreach ($dom->find('.something[data-rel]') as $this) { var_dump($this->attr()); } I tried this but error. Couldn't find any info on its documentation. I want to get the data-a's value…
user3522921
  • 67
  • 1
  • 4
5
votes
3 answers

Simple HTML DOM Parser: how to read the value of the selected option

I have this HTML piece of code already read into $html. I had extracted some correct information, but I'm stuck getting the selected option value of a select.