1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

PHP PHP Form Input Filtering

Discussion in 'Web Development' started by vareside, Nov 18, 2009.

  1. vareside

    vareside New Member

    Howdy,

    I just have a small problem on one of my latest, small projects (EYC). We have the following situation: User enters a page, sees a form, pastes the Embed Code into a <textarea> and clicks on the "Proceed" button. Now: how can I filter out a specific part from the embed code?

    Example - this is the embed code the user enters/pastes in:
    Code:
    <object width="800" height="440"><param name="movie" value="http://www.megavideo.com/v/Z12IQXAL46215bbe9383"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.megavideo.com/v/Z12IQXAL46215bbe9383" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="800" height="440"></embed></object>
    Now I want to fetch ONLY
    http://www.megavideo.com/v/Z12IQXAL46215bbe9383
    from the code. BUT the embed codes may variee on positions like width, height etc. How can I filter out the part between <param name="movie" value=" and "></param> or src=" " ?

    I'd be very thankful for every single suggestion.
     
  2. bmcoll3278

    bmcoll3278 New Member

    need more info.

    you want to read the form input into a var and then pull the url from that string. and display just the url?