I'm seeing a weird issue using the Simple HTML DOM file_get_html function.
I've got a URL of an external site I want to create a DOM for, and I've loaded it up real simply like this:
$passedLink = 'http://kotaku.com/the-first-infamous-second-son-gameplay-is-the-last-i-n-512741703'; $html = file_get_html($passedLink);
Here's a random line of the junk source dumped to the command line:
����Њ�Swl�Q��2T�@��V�|� ��n�4-�Y Zs44,SEk�FVg��1;��9PA�f(f�`$m� ��?�䯭�j�/������@�(��%�־�_�Mǫ��AK�}���X�!�@k��_�Z�q���b�GB[��[� �IW�*X�k��<l��k=^�C`��Ǿ�@�<�_<|�|�7��z�_�+O���^
(It dumps many many lines like this in a row when failing.)
When this does happen, triggering the bookmark again will usually work successfully as if nothing was wrong. As far as I can tell this is something wonky with how Gawker media serves their pages (so it happens on sites like Kotaku, Gizmodo, etc). I haven't been able to figure out why it fails so terribly sometimes, but not others, since when I re-run everything usually works fine. (I would say it fails about 2/3 of the time, but once it works, it will keep working for some short but undetermined period.)
Any tips on how to work around this? I'd be happy to work and do some tests if that would help track down the problem.
Log in to post a comment.