Veoh’s Video Downloader
Here is the script that you can use to download videos from veoh.com. I wrote this script to bid a project at rentacoder.com and finished the code within half an hour. Consist of three functions and you can put them all into a class. But I prefer let them apart.
// this is used to get url content
function get_url_content($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}// this function used to retrieve value inbetween specific delimiter
function get_inbetween($tag1,$tag2,$string) {
if (eregi(”$tag1(.*)$tag2″, $string, $out)) {
$outdata = $out[1];
}
return $outdata;
}
// this function used to download music from veoh.com
// URL: http://www.veoh.com/videos/v1734061jbnYFjPj
function get_veoh($url){
// get the music_id
$ari = explode(”/”,$url);
$v_id = array_pop($ari);
// retrieve xml files
$data = get_url_content(”http://www.veoh.com/rest/video/”.$v_id.”/details”);
// retrieve path into music files
$hasil = get_inbetween(”fullPreviewHashPath”,”fullPreviewToken=”,$data);
$hasil = str_replace(array(’”‘,’='),”",$hasil);
// yell it loud
return trim($hasil);
}
echo get_veoh(”http://www.veoh.com/videos/v1734061jbnYFjPj”);
?>
March 4th, 2008 at 9:01 pm
hi there!
nicte tool. but there seems to be a problem.
first of you need to rework the line “$hasil = str_replace(array(’”‘,’='),”",$hasil);” because current links have a “=” in the url.
deleting this line gets a link to a flv file which is at max 25mb and like 6 minutes.
could this be revised? i guess the scene needs a tool like this.
regards,
jj
March 5th, 2008 at 12:12 am
Hi ,
May i know how i can use this code???
March 20th, 2008 at 4:11 pm
This does not work!
April 1st, 2008 at 7:56 am
Any idea what the password and username would be when it tries to retrieve the file from content.veoh.com
April 7th, 2008 at 2:27 pm
This doesn’t download anything (seems like you are missing some bits) and wouldn’t work correctly even if you did have those bits, due to changes in the veoh service. If you’d like an example of a working (current as of 4/7/2008) script, see http://jetboystudio.com/veoh. It’s python, but you should be able to figure out how it’s messing with the network.
June 26th, 2008 at 9:40 am
[...] I planned to fix my previous Veoh downloader but surprisingly my country is blocked by Veoh.com. Doh, need a little workaround involving proxy [...]