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
0
votes
4 answers

How do I select a particular column in a HTML table with no ID?

I am using SimpleHTMLDOM and I have two tables with identical columns and I need to extract the column titles? Below is what I am using to get all the data but now I need to only select the Month and corresponding column titles (jan, feb, etc) …
KPO
  • 890
  • 2
  • 20
  • 40
0
votes
1 answer

Error on simple html dom removing elements

I am using simple html dom. I hav this code:
this is inner text
this is inner anchor This is outer test
I want to fetch This is outer test only. Here is…
Prajwol Onta
  • 1,448
  • 5
  • 21
  • 48
0
votes
1 answer

simple html dom help pulling data from external webpage which use session

I want to simply pull data from external url which use session. I have a website with login. after login there is a page which includs on tables data. I want to pull these data from it. Extracting data from this page is not a problem. Real problem…
0
votes
2 answers

simple_html_dom: Call to a member function find() on a non-object in

This code has been working good for months. The output consisted of a few lines containing statistics for a given username. The website from which the html page is taken is not down, and the content of the page in file_get_html hasn't changed. All…
flapane
  • 543
  • 2
  • 8
  • 21
0
votes
1 answer

Getting Fatal error using simple html dom parsing external html

I'm trying to get the latest status (in this case "Shipment delivered in good condidtion") of a TNT parcel but am unable to parse the external html using simple html dom. Getting Fatal error: Call to a member function find() on a non-object on line…
vincchan
  • 1
  • 1
0
votes
1 answer

Using simple_html_dom to check for only part of the class name

Sorry if the title of this question is poor. Allow me to explain myself (but do bear in mind that I am new to programming, and even newer to StackOverflow, both of which I am loving). Basically I am scraping data from a particular cell in an HTML…
devirkahan
  • 430
  • 1
  • 8
  • 22
0
votes
3 answers

How to extract complete sub links using Simple-HTML-DOM?

The following is the basic code I use to extract sublinks from a page: load_file($target_url); …
SilentAssassin
  • 468
  • 1
  • 9
  • 27
0
votes
1 answer

Simple HTML DOM: Notice->Trying to get property of non-object

I am getting an php notice when using simple html dom to scrape a website. There are 2 notices displayed and everything rendered underneath looks perfect when using the print_r function to display it. The website table structure is as follows: …
Bill Chambers
  • 83
  • 1
  • 9
0
votes
1 answer

Fetching images faster from a web page

I'm looking for a plugin or a simple code that fetches images from a link FASTER. I have been using http://simplehtmldom.sourceforge.net/ to extract first 3 images from a given link. simplehtmldom is quite slow and many users on my site are…
Yesh
  • 63
  • 9
0
votes
1 answer

simplehtmldom tag name lowercase and uppercase issue

I am parsing some html code with simplehtmldom, I find some issue, here some short test code: $html =<<content 1
content 2
ECHO; $str= str_get_html($html); foreach($str->find('.content') as…
yuli chika
  • 9,053
  • 20
  • 75
  • 122
0
votes
1 answer

Simple HTML Dom and Curl

Hi is curl the best method for using POST with cookie and also navigated to another page for scrapping? I'm using the coding below and I can't get it to work. include('simple_html_dom.php'); $data = array( '__EVENTTARGET' => '', …
acctman
  • 4,229
  • 30
  • 98
  • 142
0
votes
0 answers

getting colspan from simple php dom

Possible Duplicate: How to parse and process HTML/XML with PHP? how to scrape this with Simple HTML DOM I have a table text like this: $html=' …
0
votes
1 answer

Adding a if(); in Simple HTML dom parser function

Possible Duplicate: Can’t use method return value in write context What is the way to add a if statement in Simple HTML dom parser( http://simplehtmldom.sourceforge.net/ ) functionHave a look at my script include ('dom.php'); $check =…
Jessica Lingmn
  • 1,162
  • 3
  • 10
  • 15
0
votes
0 answers

persistent error when using simple_html_dom

i want to use simple_html_dom on url i used this : include_once('/simple_html_dom.php'); but returns this error : Fatal error: Call to a member function find() on a non-object in test.php on line 9 I CHMOD directory and the file to 777 , but no…
Dr ZIZO
  • 333
  • 4
  • 17
0
votes
1 answer

Extract/scrape a javascript window.open from a static html file using php

I'm trying to scrape a bunch of local html files. Each one has a piece of javascript embeded inside the file, with a different window.open path, like so:
Report
#