Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
11-06-2006, 07:23 PM #1
- Join Date
- Apr 2003
- Montreal, QC
- Thanked 2 Times in 2 Posts
Retrieving Style info with PHP 5 DOM
I have a situation where I need to determine the width and height of Youtube & Google videos from their embed codes. Ideally I'd like this to be future-proof, so, I think the best way to do this in PHP is using DOM functions. That way if the embed code changes at some point in the future the script will still work.
Youtube & Google Video set their width & height attributes differently: Youtube sets, 'width="somewidth" height="someheight"' whereas Google Video uses the style attribute: style="width: somewidth; height: someheight;"
Does anyone out there know how to do this?
Note: I'm using PHP 5.1.4, so I'm using the new PHP DOM system.