php4 dom

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cunnin45
    New Member
    • Dec 2009
    • 1

    php4 dom

    Hello, there is a way with php4 dom to change the attributes, say witdh and height, of an youtube´s object in a variable?

    for instance:
    Code:
    $string= '<object width="325" height="244">
    <param name="movie" value="http://www.youtube.com/v/l1GAZLV1pz4&hl=es_ES&fs=1&"></param>
    <param name="allowFullScreen" value="true"></param>
    <param name="allowscriptaccess" value="always"></param>
    <embed src="http://www.youtube.com/v/l1GAZLV1pz4&hl=es_ES&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="325" height="244"></embed>
    </object>';
    i was looking around but couldn`t success.
    thanks in advance!
    Last edited by Dormilich; Dec 3 '09, 09:55 PM. Reason: Please use [code] tags when posting code
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    One possible way is to use DomDocument::ge t_elements_by_t ag_name() and then use DomElement::set _attribute().

    However, PHP4 is very old and shouldn't really be used anymore.

    Comment

    Working...