WebRequest authentication login

 

Hi

can mql5 be used to login to a web site using username and password and download a page after the login page?

In JavaScript, there is the callback "Asynchronous call" and dealing with http redicection, which library mql5 may have for this kind of things?


Thanks

 
You can just have MQL spit out HTTP including CSS and JavaScript and save it as HTML file in files folder then you can simply open the page with any standard browser.
 
samjesse:

Hi

can mql5 be used to login to a web site using username and password and download a page after the login page?

In JavaScript, there is the callback "Asynchronous call" and dealing with http redicection, which library mql5 may have for this kind of things?


Thanks

If you intent on working with html,  you're much better off writing a python script to parse the web-page and then save the extracted data to a friendly file format in the /files folder for EA processing. 

 
nicholi shen:

If you intent on working with html,  you're much better off writing a python script to parse the web-page and then save the extracted data to a friendly file format in the /files folder for EA processing. 

Well, if so, then is there a way for mql5 to listen to the folder changes and run a code? i.e. automate the whole process.

 
samjesse:

Well, if so, then is there a way for mql5 to listen to the folder changes and run a code? i.e. automate the whole process.

Yes for this mql5 offers the function OnTimer(). Place the cursor on OnTimer in the editor and press F1 - start reading.

Beside that you can use a RamDisk (instead of writing it to the hd) but then you have to use the file-functions of Windows' kernel32.dll (with a W( in the function names not an A(!!)

Reason: