This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Remote File Copy PHP Script 2.0.0 | |
* | |
* Copyright 2012, Sebastian Tschan | |
* https://blueimp.net | |
* | |
* Licensed under the MIT license: | |
* http://www.opensource.org/licenses/MIT | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function downloadFile($fileUrl) | |
{ | |
$isRemoteFile = null === parse_url($fileUrl, PHP_URL_HOST) ? false : true; | |
$fileName = $isRemoteFile ? ltrim(parse_url($fileUrl, PHP_URL_PATH), '/') : pathinfo($fileUrl, PATHINFO_BASENAME); | |
// 获取文件大小 | |
if ($isRemoteFile) { | |
$ch = curl_init($fileUrl); | |
$options = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
error_reporting(E_ALL); | |
ini_set('display_errors',1); | |
get_attachments(); | |
if(isset($_GET['id']) && !empty($_GET['id'])){ | |
$id = $_GET['id']; | |
$fileName = $_GET['file']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left) | |
// https://gist.github.com/JamieMason/7580315 | |
// | |
// 1. Go to https://twitter.com/YOUR_USER_NAME/following | |
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac) | |
// 3. Paste this into the Developer Console and run it | |
(() => { | |
const followButtonQuery = '[data-testid$="-unfollow"]'; | |
const confirmButtonQuery = '[data-testid="confirmationSheetConfirm"]'; | |
const sleep = ({ seconds }) => |