Файловый менеджер - Редактировать - /var/www/fetish/scrape/download.php
Назад
<?php include('../core/init.php'); use \fetish\db; //header('Content-type: video/mp4'); //$size = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD); //echo $size; /* $opts = [ "http" => [ "method" => "GET", "header" => "User-Agent: ".$agent ] ]; $context = stream_context_create($opts); $file = file_get_contents($file_url, false, $context); echo $file; die(); */ $video = db::query("SELECT * FROM videos WHERE source = 'poopeegirls' AND download = 'PENDING' LIMIT 1")->first(); if($video){ //Download the file $file_url = 'https://irl-ns3021704-gra.dfcdn.net/4c484e8d-d3ab-4490-9578-0f28f140897c?v=0&f=4c484e8d-d3ab-4490-9578-0f28f140897c&s=109107&e=1633928312&m=50776&sig=OZF8aS%2F1BkPmhC8xv%2FKnG83umyQjMFrukBbBghuV4aw%3D&b=11902680&t=video/mp4'; //$file_url = 'https://mentor.dfcdn.net/?v=1&p=aa1e3ce5-b6ec-412c-aed5-e74f96d0c820&f=/000/skye_friend1.mp4&e=1633929087&s=-110&sig=WPuK6DJLxUvQNmszQpcm2cwzNjJGNNXiyznElPY3/o8=&b=120'; $agent= 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36'; $ch = curl_init(); $headers = array( 'referer: https://poopeegirls.com/' ); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //curl_setopt($ch, CURLOPT_VERBOSE, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_URL,$file_url); curl_setopt($ch, CURLOPT_HEADER, 0); $file = curl_exec($ch); $uri = md5(time().rand(1000,9999)).'.mp4'; $fileLocation = 'video_uploads/'.$uri; $s3 = new AWS_S3(); if($s3->putObjectString($file, $_ENV['aws']['bucket'], $fileLocation) ) { $source = $_ENV['aws']['cloudfront_url'].$fileLocation; echo $source; //$info = AWS::getObjectInfo(awsBucket, $fileLocation, true); }else{ echo 'Could not upload file'; } }else{ die('All videos have been scraped.'); } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.0.33-0ubuntu0.16.04.16 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка