Veoh’s Video Downloader

Here is the script that you can use to download videos from I wrote this script to bid a project at 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);
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
// URL:
function get_veoh($url){

// get the music_id
$ari = explode(“/”,$url);
$v_id = array_pop($ari);

// retrieve xml files
$data = get_url_content(“”.$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(“”);


Add yours

  1. jimbo jones

    04/03/2008 — 21:01

    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.


  2. muthucheliyan

    05/03/2008 — 00:12

    Hi ,

    May i know how i can use this code???

  3. This does not work! 🙁

  4. Any idea what the password and username would be when it tries to retrieve the file from

  5. 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 It’s python, but you should be able to figure out how it’s messing with the network.