A PHP script is passed some HTML code, usually starting with an object tag, sometimes with a paragraph then the object as a variable, for example;
<object width="640" height="360" ... /><embed width="640" height="360" type="application/x-shockwave-flash" src="..." /></object>
Using PHP, I need to identify the first "embed" tag in the HTML, and get the values of src, width and height to use elsewhere. I can see how this would work in RegEx, but this seems heavy handed.
The real problem is that I had it working locally with "PHP Simple HTML DOM Parser", but it doesn't work on the production server (I haven't been told why, but it sounds like it won't be possible), so now, I'm looking for a solution which will work in PHP5 without using Simple HTML.