⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addfile.php

📁 Linux下通过PHP调用WGET下载文件
💻 PHP
字号:
<?php

// addfile.php
// CyberLeo, 20050924
// An example of how to add files to downloady.

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head>
<meta http-equiv="content-type" content="text/xhtml; charset=iso-8859-1" />
<title>Downloady - PHP Download Manager - By CyberLeo</title>
</head>
<body>
<?
$url = (isset($_REQUEST['url'])? $_REQUEST['url'] : NULL);

if($url) {
	$url_parts = parse_url($url);

	switch($url_parts['scheme']) { // Make sure the URL is valid
		case "http":
		case "https":
		case "ftp":
			require_once("downloady.php");
			$d = new downloady;
			$d->AddURL($url);
?>
					File has been added for download. Please visit the <a href="dstatus.htm">Download Manager</a> to watch some pretty colors as your download progresses.
<?
			break;

		default:
?>
					<h2>Sorry, this URL is not allowed for download. Only URLs containing the schemes 'http', 'https' and 'ftp' are permitted for download.</h2>
<?
		}
	}
else {
?>
		<form enctype="application/x-form-urlencoded" method="get" name="download">
			<input name="url" size="50" type="text" value="&lt;Enter URL here&gt;" onfocus="if(this.value == '&lt;Enter URL here&gt;') this.value = '';"/>
			<input type="submit" value="Submit"/>
		</form>
<?
	}
?>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -