Greetings, Hashcoders .
Help in writing a script.

There is a site, it has an object element.
<object id="videoplayer4655" type="application/x-shockwave-flash" data="http://site.com/uppod.swf" width="495" height="333"> <param name="allowFullScreen" value="true"> <param name="allowScriptAccess" value="always"> <param name="wmode" value="transparent"> <param name="movie" value="http://site.com/uppod.swf"> <param name="flashvars" value="comment=filmix&amp;st= http://site.com/styles/video23-1169.txt&amp;file=XRHzQZe3yMzgDWw4BmwsyWYw7C60y07w5mkw20k=f0uYf0QYfxtM5i=w2WEM20D=fW5lDW2Gynpl2T6JXxJgkxkLBmwg5aH3QTYWBR5uBvtuXRHzQZe3yvD8Dxk3yi2gDWw4BmwsyWYw7C60y07w5mkw20k=f0uYf0QYfxtM5i=w2WEM20D=fW5lDW2Gynpl2T6JXxJgkxkLBmwg5aH3QTYWBR5h&amp;vast_preroll=http%3A%2F%2Fads.adfox.ru%2F175105%2FgetCode%3Fp1%3Dbiwlo%26p2%3Demxn%26pfc%3Da%26pfb%3Da%26plp%3Da%26pli%3Da%26pop%3Da%26puid1%3D%26puid2%3D&amp;or_timeout=2"></object>

I need to implement this so that this player appears on my website, but the problem is that the stream session is relevant only for one user, i.e. another user on my site will not be able to see the video.
It is necessary to make sure that with each opening of the site (mine) - the player code (namely the last "value") for each user is updated.
I will be glad to any help, because you need to urgently implement. Thank.

    1 answer 1

    Here is a small example:

      <?php //получение страницы (есть более хорошие способы, но этот самый короткий) $content = file_get_contents('http://www.youtube.com/watch?v=u2GsF1NV9FI'); //а тут происходит удаление тега <img ... > //можете найти регулярным выражением и заменить нужное вам $res = preg_replace('/<img.+>/','',$content); print $res; ?>