Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Execute youtube-dl program using PHP

I recently installed youtube-dl command line program and PhantomJS. Everything works fine using my terminal. The thing is i want to make a php script to display the title of file. I'm new to command-line programs.

I just Wrote the code with exec() function. I'm sure its not enough, Anybody can help me to solve my problem ?

In Command-line i used -

youtube-dl -g https://openload.co/embed/4qpYjvzmrrc/

It works perfect !

The PHP :

<?php
   echo exec('youtube-dl -g https://openload.co/embed/4qpYjvzmrrc/');
?>

I'm sure its not enough, Anybody can help me to return the result ?

Comments