Video Extraction Script (PHP)

Video Extraction Script (PHP)

Cancelled

Job Description

We need several PHP functions to extract direct links to media files from
pages of some media websites. Functions should be created in pure PHP
language only to work in background on our server, i.e. it should not be
browser extension or something similar. Any standard PHP extension (curl,
etc.) can be used.

If page have several versions of same file with different quality, link to
file with best quality should be extracted. If page have several versions
of file in different format, MP4 format is preferable.

Function should look like this:

function extractFileYoutube($pageURL)
{
// ...some code
return $directLink;
}

For example, if function will be called for this link:
http://www.youtube.com/watch?v=9tN3dPU6WdQ
it should return this link:
http://r10---sn-n8v7sn7e.c.youtube.com/videoplayback?id=f6d37774f53a59d4&upn=qHutvHpzFOg&cp=U0hWSVhLT19MTENONl9QRVNKOmhycVdEenhEMnow&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&mt=1374776383&mv=m&sver=3&expire=1374801972&itag=18&ratebypass=yes&ipbits=8&key=yt1&ip=109.234.156.218&fexp=927301%2C904464%2C914006%2C901466%2C909546%2C929117%2C929121%2C929906%2C929907%2C925720%2C925722%2C925718%2C925714%2C929917%2C929919%2C912521%2C904830%2C919373%2C904122%2C932216%2C908534%2C919387%2C935004%2C936303%2C909549%2C900816%2C936301%2C912711%2C935000%2C921057&source=youtube&ms=au&signature=5E21348E6E7E4825DDEF1287E9D4EF21E9DCBB3F.71C18348C6D31B0A7E4ADAE2F55B5BE534B00C0B&title=Pulling+together-+How+gravity+shapes+Planet+Earth

Produced link should allow to download file by wget or download manager
without opening the webpage of target website.

List of necessary websites:

clipsyndicate.com
breitbart.com
newsbusters.org
realclearpolitics.com
youtube.com
cnn.com
foxnews.com
cnbc.com
msnbc.com
cbsnews.com
cnsnews.com

Only candidates with similar working experience will be considered and you will be asked for a demo or similar work done.