Go Back   Free website templates > Web Template Help > PHP and MySQL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Join now to download all the free website templates or post on the forum. If you have never been on a forum before read the FAQ. It's quick, easy and free to join!
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-23-2008, 07:13 PM
vareside's Avatar
Senior Member
 
Join Date: Jul 2007
Posts: 254
vareside is on a distinguished road
Post Video Downloader

Hi folks,
I need a free script that enables my users to download videos from sites like Metacafe, Youtube, Blip, Revver, iFilm, Vareside etc.
Reply With Quote
  #2 (permalink)  
Old 05-24-2008, 06:53 AM
pezboy45's Avatar
Mod/Design & Coder [Pro]
 
Join Date: Nov 2006
Location: Hawaii
Posts: 686
pezboy45 is on a distinguished road
Send a message via AIM to pezboy45 Send a message via MSN to pezboy45
Default

__________________


If I ever don't follow up on something, please feel free to PM me. I've got a lot going on, so a friendly reminder helps.
Reply With Quote
  #3 (permalink)  
Old 07-26-2008, 03:08 PM
vareside's Avatar
Senior Member
 
Join Date: Jul 2007
Posts: 254
vareside is on a distinguished road
Default

Something like http://www.flashload.net/
Reply With Quote
  #4 (permalink)  
Old 07-26-2008, 03:41 PM
vareside's Avatar
Senior Member
 
Join Date: Jul 2007
Posts: 254
vareside is on a distinguished road
Question

Well, can someone actually tell me how to run this PHP code propperly? Because I just found it on the web:

function get_content_of_url($url){
$ohyeah = curl_init();
curl_setopt($ohyeah, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ohyeah, CURLOPT_URL, $url);
$data = curl_exec($ohyeah);
curl_close($ohyeah);
return $data;
}

function get_flv_link($string) {
if (eregi("watch_fullscreen\?video_id=(.*)&title=", $string, $out)) {
$outdata = $out[1];
}
return 'http://youtube.com/get_video.php?video_id='.$outdata;
}

function get_http_header($url){
$uh = curl_init();
curl_setopt($uh, CURLOPT_URL, $url);
curl_setopt($uh, CURLOPT_HEADER, 1);
curl_setopt($uh, CURLOPT_RETURNTRANSFER, 1);
$res = curl_exec($uh);
curl_close($uh);
return $res;
}

function show_url($http_header){
$arai = explode("\n",$http_header);
foreach($arai as $ini){
if(eregi("location",$ini)) $url = $ini;
}
list($sampah,$hasil) = explode("Location:",$url);
return str_replace("\n","",trim($hasil));
}

function download_youtube($url){
$data = get_content_of_url($url);
$next_url = get_flv_link($data);
$data = get_http_header($next_url);
return show_url($data);
}

$url = "http://youtube.com/watch?v=SAQZ0BDXn48";
echo download_youtube($url);
Reply With Quote
  #5 (permalink)  
Old 07-28-2008, 06:44 AM
pezboy45's Avatar
Mod/Design & Coder [Pro]
 
Join Date: Nov 2006
Location: Hawaii
Posts: 686
pezboy45 is on a distinguished road
Send a message via AIM to pezboy45 Send a message via MSN to pezboy45
Default

Yea, your supposed to do this:

PHP Code:
<?php 
function get_content_of_url($url){
$ohyeah curl_init();
curl_setopt($ohyeahCURLOPT_RETURNTRANSFER1);
curl_setopt($ohyeahCURLOPT_URL$url);
$data curl_exec($ohyeah);
curl_close($ohyeah);
return 
$data;
}

function 
get_flv_link($string) {
if (
eregi("watch_fullscreen\?video_id=(.*)&title="$string$out)) {
$outdata $out[1];
}
return 
'http://youtube.com/get_video.php?video_id='.$outdata;
}

function 
get_http_header($url){
$uh curl_init();
curl_setopt($uhCURLOPT_URL$url);
curl_setopt($uhCURLOPT_HEADER1);
curl_setopt($uhCURLOPT_RETURNTRANSFER1);
$res curl_exec($uh);
curl_close($uh);
return 
$res;
}

function 
show_url($http_header){
$arai explode("\n",$http_header);
foreach(
$arai as $ini){
if(
eregi("location",$ini)) $url $ini;
}
list(
$sampah,$hasil) = explode("Location:",$url);
return 
str_replace("\n","",trim($hasil));
}

function 
download_youtube($url){
$data get_content_of_url($url);
$next_url get_flv_link($data);
$data get_http_header($next_url);
return 
show_url($data);
}

$url "http://youtube.com/watch?v=SAQZ0BDXn48";
echo 
download_youtube($url);
?>
But, I tried it, and it didn't work...
__________________


If I ever don't follow up on something, please feel free to PM me. I've got a lot going on, so a friendly reminder helps.
Reply With Quote
  #6 (permalink)  
Old 07-28-2008, 09:18 AM
vareside's Avatar
Senior Member
 
Join Date: Jul 2007
Posts: 254
vareside is on a distinguished road
Default

Ok, does anyone else have a working code then?
Reply With Quote
  #7 (permalink)  
Old 07-28-2008, 06:02 PM
Jaybirddesigns's Avatar
Senior Member
 
Join Date: Apr 2008
Location: Helendale,ca
Posts: 133
Jaybirddesigns is on a distinguished road
Default

Don't know if this helps or not but maybe you could implement it with your current site, open source: http://phpmotion.com/
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:08 PM.



mouseover mouseover mouseover