源码:
<form method=”post”>
<input name=”url” size=”50″ />
<input name=”submit” type=”submit” value=”Download”/>
</form>
<?php
// maximum execution time in seconds
set_time_limit (24 * 60 * 60);
if (!isset($_POST[‘submit’])) die();
// folder to save downloaded files to. must end with slash
$destination_folder = ‘temp/’;
$url = $_POST[‘url’];
$newfname = $destination_folder . basename($url);
$file = fopen ($url, “rb”);
(更多…)