1

So, I am trying to echo a page in PHP Simple HTML DOM for a project I am working on and it seems that it is skipping most of the page. I have spent around 6 hours on this and am stuck so I am asking for help.

Can't get much more simple then this

    <?php 
    ini_set('memory_limit', '-1');
    include('simple_html_dom.php');                                             //includes simpledomhtml
    echo file_get_html('http://steamcommunity.com/profiles/76561198049810642/games?tab=all')->plaintext; 
?>

Yet the output is completely missing ALL of the text in the middle including Game names, hours, links and so on in the middle. I assume this is a result of that part of the page being within a section, but I thought PHP Simple HTML DOM was capable of parsing through things like this. Try it you're self, it makes no sense. I have tried countless variants of code. Please help.


So I think you are right about the plaintext output so instead of moving this post in a direction I don't need I am making a new topic with a more focused question PHP Simple HTML DOM Outputting Blank Page

2
  • 1
    Can you paste the output somewhere? (pastebin.com for example). :) Commented Apr 19, 2013 at 6:34
  • 1
    Well processing the file with ->plaintext should remove all html tags... That can probably cause the results you see. Commented Apr 19, 2013 at 6:34

1 Answer 1

1

Using the ->plaintext method you won't be able to fetch contents that is generated dynamically with javascript, as it looks to be on the page you are loading.

With only

file_get_html('http://steamcommunity.com/profiles/76561198049810642/games?tab=all'); 

You should see a duplicate of the page?

Then just start processing the items you want to keep.

http://simplehtmldom.sourceforge.net/manual.htm

Sign up to request clarification or add additional context in comments.

1 Comment

I feel that this is indeed the case so I have stopped with this experiment which seems to just be a waste of time and moved on to posting my original question. stackoverflow.com/questions/16109213/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.