<?php
// tantro.info
// make file cookie.txt with write and read permission
// Use : getlink.php?id=https://www.fshare.vn/file/VR5TMS467A
$id = $_GET['id'];
$idfile = explode("file/", $id);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $id);
curl_setopt($ch, CURLOPT_COOKIEFILE, getcwd () . '/cookie.txt' ); // Write session to cookies file
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("X-Forwarded-For: 123.30.135.76"));
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3");
preg_match('#<input type="hidden" value="(.*?)" name="fs_csrf" />#',curl_exec ($ch),$get_fs_csrf);
$param = 'fs_csrf=' . $get_fs_csrf[1] . '&DownloadForm%5Bpwd%5D=&DownloadForm%5Blinkcode%5D='.$idfile[1].'&ajax=download-form&undefined=undefined';
// Param for post : fs_csrf=0b31afc7be66a8a6c8547aa615967a56a34c1324&DownloadForm%5Bpwd%5D=&DownloadForm%5Blinkcode%5D=VR5TMS467A&ajax=download-form&undefined=undefined
// MAKE POST
$url_post = "https://www.fshare.vn/download/get";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url_post);
curl_setopt($ch, CURLOPT_COOKIEFILE, getcwd () . '/cookie.txt' ); // Read cookies and send
curl_setopt($ch, CURLOPT_POSTFIELDS,$param);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, 'https://www.fshare.vn/file/T0RFMWT0RT');
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3"); // User agent
$page = json_decode(curl_exec($ch),true);
echo "Link: ". $page['url'];
Bài viết liên quan:
https://severphim.blogspot.com/2017/02/code-get-link-fshare-122016.html
KLQ cơ mà bạn cho mình xin css + javascripts template xemphimon dc k :)
Trả lờiXóaCho em hỏi lúc e thêm vào nó xuất ra trang trắng là sao thế bác
Trả lờiXóa