/ Published in: PHP

Extracts the video title & download URL from a youtube page and starts a download.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (!$url) { echo "Please enter a URL."; } else { // Extract video title. // Extract video download URL. // Force download of video. exit; } } ?> <form method="post"> <label for="url">URL:</label> <input type="text" name="url" value="" id="url"> <input type="submit" name="submit" value="Download"> </form>
Comments
