File "download.html"
Full Path: /home/analogde/www/copy/download.html
File size: 536 bytes
MIME-type: text/html
Charset: utf-8
<html>
<head>
<title>Download Files</title>
</head>
<body>
<p><a href="abc.csv">Download TEXT file</a></p>
</body>
</html>
<?php
$file_name = basename("abc.csv");
// Use file_get_contents() function to get the file
// from url and use file_put_contents() function to
// save the file by using base name
if (file_put_contents($file_name, file_get_contents($url)))
{
echo "File downloaded successfully";
}
else
{
echo "File downloading failed.";
}
?>