I am trying to make a small script that interfaces with
linux's lftpget. Here is the code:
form.html - Initial form
<html>
<body>
<center><h2>Download from MyFTP Site</h2></center>
<form name="file_form" action="filecall.php">
<table border=0 align=center>
<tr>
<td>Enter Filename:</td><td><input type="text" name="file_name"></td>
</tr>
<tr>
<td colspan=2 align=center><input type="submit" name="submit" value="Go!"></td>
</tr>
</table>
</form>
</body>
</html>
filecall.php - php file that "should" download the
file specified to the current directory
<?php
$file = $_GET['file_name'];
system('lftpget ftp://myuser:mypass@ftp.some.com/$file');
?>
Need Suggestions. If I replace $file with an actual file name this works fine by accessing the filecall.php script directly. Why is it not recognising my variable???