dilbertone Posted May 28, 2011 Share Posted May 28, 2011 good day dear community, this is a big issue. I have to decide: between native PHP DOM Extension or of simple DOM html parser well i want to parse the site here: http://buergerstiftungen.de/cps/rde/xchg/SID-A7DCD0D1-702CE0FA/buergerstiftungen/hs.xsl/db.htm http://buergerstiftungen.de/cps/rde/xchg/SID-A7DCD0D1-702CE0FA/buergerstiftungen/hs.xsl/db.htm I will suggest to use the native PHP "DOM" Extension instead of "simple html parser", since it will be much faster and easier What do you think about this one here...: $doc = new DOMDocument @$doc->loadHTMLFile('...URL....'); // Using the @ operator to hide parse errors $contents = $doc->getElementById('content')->nodeValue; // Text contents of #content look forward to hear from you best regards db1 Quote Link to comment https://forums.phpfreaks.com/topic/237730-native-php-dom-extension-versus-simple-dom-html-parser/ Share on other sites More sharing options...
mikesta707 Posted May 28, 2011 Share Posted May 28, 2011 you seem to have answered your own questions... If the PHP DOM extension is faster and easier to use.. why not use it? Quote Link to comment https://forums.phpfreaks.com/topic/237730-native-php-dom-extension-versus-simple-dom-html-parser/#findComment-1221687 Share on other sites More sharing options...
dilbertone Posted May 28, 2011 Author Share Posted May 28, 2011 hello dear mikesta many thanks for the quick answer. you seem to have answered your own questions... If the PHP DOM extension is faster and easier to use.. why not use it? thx - great to hear from you! Well many thanks - you help me alot! one question - since i am a php-newbie ;-) can i apply this code also on another target!? http://buergerstiftungen.de/cps/rde/xchg/SID-F8780E81-ABF20567/buergerstiftungen/hs.xsl/db.htm is this possible to fetch the results ( approx 230 different records) too and parse them!? look forward to hear from you best regards db1 Quote Link to comment https://forums.phpfreaks.com/topic/237730-native-php-dom-extension-versus-simple-dom-html-parser/#findComment-1221715 Share on other sites More sharing options...
mikesta707 Posted May 28, 2011 Share Posted May 28, 2011 I dont see why it wouldn't be possible. Seems very possible to me. I don't know everything about your/their system and setup, but you should be able to scrape that page for the information you want using DOM object. Quote Link to comment https://forums.phpfreaks.com/topic/237730-native-php-dom-extension-versus-simple-dom-html-parser/#findComment-1221718 Share on other sites More sharing options...
xyph Posted May 28, 2011 Share Posted May 28, 2011 He's posted this like 4 times now. He wants someone to do it for him. Quote Link to comment https://forums.phpfreaks.com/topic/237730-native-php-dom-extension-versus-simple-dom-html-parser/#findComment-1221721 Share on other sites More sharing options...
dilbertone Posted May 28, 2011 Author Share Posted May 28, 2011 hi Mikesta I dont see why it wouldn't be possible. Seems very possible to me. I don't know everything about your/their system and setup, but you should be able to scrape that page for the information you want using DOM object. thx for the quick answer. I will try to write the code for 1. fetching 2. parsing 3. storing on a local mysql database i come back and report all.. - Then yo can have closer look and give a code review... greetings.... db1 Quote Link to comment https://forums.phpfreaks.com/topic/237730-native-php-dom-extension-versus-simple-dom-html-parser/#findComment-1221722 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.