What HTTP GET/POST request is generated by the button press?
Can you capture the URL and GET/POST request sent by the browser when the button is pressed and use that in your program?
Does the button press generate an https or http request?
Can you use a proxy server that will capture the request sent from the browser using that proxy server when the button is pressed?