note 64814 rejected from function.system by bjori
| From: | bjori@php.net | Date: | Fri, 21 Apr 2006 08:00:18 +0000 |
| Subject: | note 64814 rejected from function.system by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108899@lists.php.net to get a copy of this message | ||
Note Submitter: vidyashankara at gmail dot com
----
Here is the problem i am facing. I want a script that download a file into the server(into a
destined folder). I am guessing i need to use the system(wget) command for that.
<form name='pdb_id' method=POST action=download.php>
<input type=text name=id>
<input type='submit' name='submit' value='Download PDB File'>
</form>
when the user types into the id into the text field, i want the script to download the following
file into \uploaded_pdb\ folder
the file is at
http://www.rcsb.org/pdb/downloadFile.do?
fileFormat=pdb&compression=NO&structureId=$id
where $id is the text the user inputs.
for example,
if the user inputs 1AV1
the server should download
http://www.rcsb.org/pdb/downloadFile.do?
fileFormat=pdb&compression=NO&structureId=1AV1
and save it in /uploaded_pdb/
what do you think i should do now?
$pdb = system(get http://www.rcsb.org/pdb/downloadFile.do?
fileFormat=pdb&compression=NO&structureId=$id)
is that correct? it isnt working...
I am running on linux!
Any help would be appreciated!
Thanks a lot
Vidyashankar