Modified copy of john_schlick's Simple HTML DOM