vidyashankara Posted April 21, 2006 Share Posted April 21, 2006 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\ folderthe file is at [a href=\"http://www.rcsb.org/pdb/downloadFile.do?fileFormat=pdb&compression=NO&structureId=$id\" target=\"_blank\"]http://www.rcsb.org/pdb/downloadFile.do?fi...tureId=$id[/a]where $id is the text the user inputs. for example,if the user inputs 1AV1the server should download[a href=\"http://www.rcsb.org/pdb/downloadFile.do?fileFormat=pdb&compression=NO&structureId=1AV1\" target=\"_blank\"]http://www.rcsb.org/pdb/downloadFile.do?fi...tructureId=1AV1[/a]and save it in /uploaded_pdb/what do you think i should do now? $pdb = system(get [a href=\"http://www.rcsb.org/pdb/downloadFile.do?fileFormat=pdb&compression=NO&structureId=$id)\" target=\"_blank\"]http://www.rcsb.org/pdb/downloadFile.do?fi...ureId=$id)[/a]is that correct? it isnt working...I am running on linux!Any help would be appreciated!Thanks a lotVidyashankar Quote Link to comment Share on other sites More sharing options...
vidyashankara Posted April 23, 2006 Author Share Posted April 23, 2006 anyone know what to do? Quote Link to comment Share on other sites More sharing options...
raila Posted April 23, 2006 Share Posted April 23, 2006 Not sure i understod the problem, but i gave it a go anyways:If the problem is that you dont get the $id in download.php to say the same as te user typed in the textbox:Try this:This line gets the text the user typed ito the textbox called "id".(it needs to bee in the target file:)<form name='pdb_id' method=POST action=download.php><input type=text name=id><input type='submit' name='submit' value='Download PDB File'></form>download.php:$id = $_POST['id']; // should return the text the user typedNot sure if this helps you in anywaybut it was worth the try :-)Raila Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.