Jump to content

Trying to download a youtube video by running a script on localhost

- - - - -

  • Please log in to reply
1 reply to this topic

#1
onething

onething

    Programmer

  • Members
  • PipPipPipPip
  • 118 posts
After failing at a number of different scripts, programs and possibilities at trying to download a youtube video, I chanced upon this script

include('curl.php');

include('youtube.php');


$tube = new youtube();


$links = $tube->get($_POST['url']);


from

http://www.ngcoders.com/php/php-youtube-video-downloader-script

It seems simple but I don't quite get it. I thought perhaps where it says 'url', a youtube webpage had to go there, but I was wrong, it seems. I put one in there, slapped it all into dreamweaver (the script actually pasted over the default dreamweaver html text), saved the php file. Copied it into my xampp htdocs folder. Opened my browser to localhost/script.php but all I got was this text written there as if I was making a webpage of php not writing a script where php acts on something.

What am I doing wrong?

#2
Aetion

Aetion

    Newbie

  • Members
  • Pip
  • 4 posts
Hi,
What was the text/output written to the browser, when u ran the script.php ?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users