So i was reading that "Cature Video Topic" and its funny because thats what ive been working on all day. I am making a video downloader/proxy for youtube vidoes. And im having some trouble. I need to grab the "video_id" and the "signature" from a youtube page and I'm hainging some regex trouble. The Array keeps returning empty.
here is my code, i know its rough.
<?php
if($_POST){
$string = file_get_contents($_POST['youtube']);
$pattern = '/^var swfArgs = {.*};$/';
$json = preg_match($pattern, $string, $jsonmatch);
print_r($jsonmatch);
?>