title: How to simulate a web browser to interact with a https server
body: <p>There is a website(using https protocol) that I can login with a username and a password in a web browser. Now I want to write a backend program to simulate this login action. How to do it? Give me some ideas. </p>
  
  <p>update:
  And there is a lot of javascript , is it possible to use curl to do this thing? Does curl can provide a js run time environment? If not, how to resolv the javascript things?</p>