View Single Post
Old 07-19-2013, 09:23 AM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,587
Quote:
Originally Posted by Dankasaur View Post
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
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


My Cam Feeds Script / Gallery Scraper / WPXXX Theme / Free Templates
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote