how to use preg_match to extract a http url which ends with .flv from remote html
hi all. i am loading an external url using file get content.i wonder how i can use preg_match to find the first url that starts with http and ends with .flv? i want to output that url . could any one show me how this can be done.Thanks
PHP Code:
<?
$html = file_get_contents("http://www.somesite.com/?media=91574");
preg_match('/start&file(.*?) .flv', $html, $tdmatch);
?>
example of html:
<link rel="video_src" href="http://www.somesite.com/player4/flv/playe4.swf?type=http&streamer=start&file=http://www.pathtourl.com/media/video14.flv"/>
Note : i want to get this value:http://www.somesite.com/player4/flv/...ia/video14.flv