Quote:
Originally Posted by Dankasaur
Not even close. 
|
Code:
<?php
$url = 'http://vube.com/A+Little+love+from+Carly+/UycxbxJm0q?t=s';
$regex = '/http(?:s?):\/\/(?:www\.)?vube\.com\/[a-zA-Z0-9\W]+\/([a-zA-Z0-9\W]{1,10})/';
if(preg_match($regex,$url,$matches)) {
$data = file_get_contents($url);
preg_match('/<meta name="twitter:image" content="(.*)" \/>/', $data, $m);
$video = str_replace('.jpg','.mp4','http://video.thestaticvube.com/video/4/' . basename(parse_url($m[1],PHP_URL_PATH)));
$thumb = $m[1];
echo $thumb . "\n" . $video . "\n";
}
for you scraping lovers