I have a site based on php/mySQL where publishers had inserted a lot of youtube videos in a specific database column copiyng/pasting youtube embed codes. There is a wide variance of the codes reflecting the variations google made during time. Different sizes of the player window is the main variation. Now I need to uniform all the windows, but I don’t know where to start. What I need to reach is something like a regexp to eliminate all the not necessary code from the various entries (i.e. convert all embed codes in their corresponding youtube url?) and then create a script to generate the player code runtime…
Some help to look where to start?
Thank you!
I have a site based on php/mySQL where publishers had inserted a lot of
Share
New Complete Solution:
Old Summarized Answer:
[Regex for extracting video ID]. After getting video ID, you have the video ID. Use this ID to generate a clean consistent code for all your videos. Then, update the database.