Large

AutoEmbedVideoFromLink

By darkyndy Last update May 13, 2010 — Installed 7,191 times.

Blog/Website Usage

in
Subscribe to Blog/Website Usage 3 posts, 2 voices



Warren Dunlop Scriptwright
FirefoxWindows

Is there a way to use this to convert youtube links on a page server side (like automatically doing it on a specific page for users).

Let me explain further. I have a tumblr blog that pulls in all of my twitter posts. I'll often posts links to youtube videos that I enjoyed. What I want is to scan the page for any youtube links (example: EMBEDDED YOUTUBE LINK) on the page and then embed them automatically.

In PHP I was attempting to use a preg_replace function and found regex codes to use within the function here: http://all4wp.blogspot.com/2008/03/regex-for-em...

EmbeVi is the solution... Tried the PHP class from http://www.embevi.com/ too... no luck.

 
darkyndy Script's Author
FirefoxWindows

Hi,

With twitter there is a problem because they don't let the link in the initial state, they use short url and from a simple video link it's a link that you don't have a clue what is it behind it.

The PHP class can be used if you will give as a parameter the actual link. I will extend the class functionality that you can put as a parameter a string that can contain text/links and will return that text and video codes.

But for the short-url problem I suggest to search for a script/PHP class that will get a link as a parameter and will return the actual link and the use EmbeVi to parse that link.

 
darkyndy Script's Author
FirefoxWindows

Warren Dunlop I can announce you that today I've released EmbeVi PHP5 Class version 1.2 that supports embedding videos behind shorten URLs. Check http://www.embevi.com/ for the download link and sample code.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel