I have to automate my submission of data into websites (ie fasta sequence to online blast and getting the result page into matlab). I was unsuccessful with urlread/urlwrite.
I have to automate my submission of data into websites (ie fasta sequence to online blast and getting the result page into matlab). I was unsuccessful with urlread/urlwrite.
You will need to use a tool that emulates a web browser: stores cookies, authenticates, submits forms etc. There are probably hundreds of approaches for just about all programming languages.
I usually use twill
The method is heavily dependent from the used way of data submission. If it is via GET, then just attach the data in the proper way to the url (e.g. www.../query.php?data=myData). In case of a POST you might copy the query form. Try to call the web service using this local file. In case this works, you have to change the form such that the data is submitted on loading (some details). Finally, you can generate filled-out formulars with Matlab by setting default values in all text boxes or check boxes.
In parallel, you might take a look at the www:mechanize module. It comes for several programming languages and thus can be called indirectly by Matlab.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Ah sorry haven't noticed the Matlab tag in the title. Even so you could just call twill in a system call from Matlab.