FreelanceRadar.com

Php/sql Search And Replace
Title:   Php/sql Search And Replace
Created:   03/11/2010 2:30 PM
Description:   I own a website based on a script and i have to do a big amount of "search and replace" operations. I am losing too much time doing it manually so i am looking for some helps from a programmer.

I have two goals for that project, here are the details:

-I have a database with some videos in flv. Each video has a field with the video url in a html code. What i need to do is to extract the flv file location from this html code and insert this flv url location in an other html code. Currently the html code uses a flv player from a third party website and i want to host my own flv player on my website.

To give an example, let's take this code:
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='300' height='300' id='player1' name='player1'>
<param name='movie' value='http://OTHERWEBSITE.COM/player.swf'>
<param name='allowfullscreen' value='true'>
<param name='allowscriptaccess' value='always'>
<param name='flashvars' value='file=playlist.xml'>
<embed id='player1'
name='player1'
src='player.swf'
width='300'
height='300'
allowscriptaccess='always'
allowfullscreen='true'
flashvars="file=http://OTHERWEBSITE.COM/VIDEOURLLOCATION.FLV"
/>
</object>

I want to get the VIDEOURLLOCATION.FLV in this piece of code:

<object type="application/x-shockwave-flash" data="http://mywebsite.com/my-own-player.swf" width="320" height="240">
<param name="movie" value="http://mywebsite.com/my-own-player.swf" />
<param name="allowFullScreen" value="true" />
<param name="FlashVars" value="flv=http://OTHERWEBSITE.COM/VIDEOURLLOCATION.FLV" />
</object>

I have 1000 videos in the database so a script that can do the search and replace for this would save me a lot of time.

- I need a piece of code to search and replace a key in my database, it should be pretty straighforward with cURL functions.

If you think you have any questions or need details, please send your questions.

Thanks
Category:   PHP
Programming
Flash
XML
SQL
Website:   ScriptLance
Options:   View the Complete Listing Now | Bid on this Project Now