I'm trying to automate a download from a site where I'm a paid member.
To do this I must log in and then fill out a form (see below).
The site is MS using a VB_Script.
Once I figure out how to log in and the url to download the data, I think I have worked out the rest from the php manual.
My questions are:
How can I log in using php run from my web server?
What is the URL to download the data for today?
-----------------------------
LOGIN FORM
------------
Code: Select all
<BODY class=Body2 onload=document.frmLogin.memberID.focus();>
<FORM name="e;frmLogin"e; action="e;https://www.xxxx.com.au/mb_login_page.asp?_sn=ED4EEE9E-7E68-4D97-8B70-E96EB1C20895&_c=&_dt=17%2F03%2F2005+10%3A12%3A01+AM&popUpType=Login"e; method="e;POST"e;>
<INPUT type=hidden name="e;GoBack"e; value="e;"e;>
Member ID
<INPUT type="e;text"e; name="e;memberID"e; size="e;20"e; class="e;clsFieldData"e; value="e;myname"e;>
<br><br>
Password
<input type="e;password"e; name="e;pswd"e; size="e;20"e; class="e;clsFieldData"e; value="e;xyz123"e;>
<br><br>
<INPUT TYPE="e;checkbox"e; NAME="e;remember_me"e; VALUE="e;Y"e; checked>
remember my details
<INPUT class="e;clsBtnGo"e; type=submit name="e;subLogin"e; value="e;Login"e;>
&nbsp;&nbsp;
<INPUT class="e;clsBtnGo"e; type=submit name="e;subCancel"e; value="e;Cancel"e;>
</FORM>DOWNLOAD FORM
-------------------
Code: Select all
<!-- http://www.xxx.com.au/MB_Download_Price.asp -->
<!--
http://www.xxx.com.au/MB_download_price_show.asp?mode=all&oneday=20&onemon=07&oneyear=2005&dataformat=metastock&B1=Get+Historical+Data
http://www.xxx.com.au/MB_download_price_show.asp?mode=all&oneday=20&onemon=07&oneyear=2005&dataformat=metastock
Referring URL: http://www.xxx.com.au/Shares/default.asp?_sn=568D09AF-D6DA-4BC7-867C-0618B0F3C7D9&_c=71290&_dt=21%2F07%2F2005+3%3A42%3A70+PM
-->
All Securities - Only last 4 weeks available.
<br><br>
<FORM name="e;AllSec"e; method=POST action="e;http://www.xxx.com.au/MB_download_price_show.asp?mode=all"e; target="e;_blank"e; <!-- onsubmit="e;return ValidateAll(this)"e; -->>
Date
&nbsp;
<input type=text name=oneday size=2 maxlength=2 value=01>/
<input type=text name=onemon size=2 maxlength=2 value=07>/
<input type=text name=oneyear size=4 maxlength=4 value=2005>
(DD/MM/YYYY)
<br><br>
Data Format:
<select name=dataformat class="e;clsFieldData"e;>
<option value=metastock><FONT FACE="e;Arial"e; SIZE=2>MetaStock</FONT>
<option value=ezy><FONT FACE="e;Arial"e; SIZE=2>Ezy Chart</FONT>
<option value=ezy2><FONT FACE="e;Arial"e; SIZE=2>Ezy Chart (Indices * 100)</FONT>
<option value=insight><FONT FACE="e;Arial"e; SIZE=2>Insight Trader</FONT>
<option value=insight2><FONT FACE="e;Arial"e; SIZE=2>Insight Trader (Indices * 100)</FONT>
<option value=metastockvol><FONT FACE="e;Arial"e; SIZE=2>MetaStock (Vol % 100)</FONT>
</select>
<br><br>
<input type=submit name=B1 value="e;Get Historical Data"e; class="e;clsBtnGo"e;>
</FORM>Code: Select all
orCode: Select all
tags where required! [/color]