Facebook
From Trivial Peccary, 3 Years ago, written in PHP.
This paste is a reply to Untitled from Harmless Goat - go back
Embed
Viewing differences between Untitled and Re: Untitled
set_time_limit(0);
$url = 'https://zaq2.pl/video/some_random_video_id';
pl/video/bqfi';
$response = file_get_contents($url, false, stream_context_create(['ssl' => ['verify_peer' => false, 'verify_peer_name' => false]]));
preg_match('#data-video-url="(.*?)".*data-file-name="(.*?)".*data-file-extension="(.*?)"#s', $response, $match);
$path = './download/'.$match[2].'.'.$match[3];

if($match !== null && file_exists($path) === false)
{
 echo 'wget --referer="'.$url.'" -c "'.$match[1].'" -O "'.$path.'"';
}
?>