Automating login and data update in PHP with CURL

one text

Currently there is an IT system with a web interface (login with user ID and password), where you login and then update some data.

Users receive an email from another IT system (written in PHP), with a request to manually enter the data into the first IT system.

I was thinking it may be possible to write a simple robot in PHP which automates this procedure of logging into the first IT system and updating the data.

The robot would be implemented in the second IT system and use the CURL library to login and make the changes (using HTTP, with GET and POST requests).

But to do this I need to understand how the login and data update works in the first IT system, because after the first (simple) login mask which generates a POST request, things get complicated: there is a Javascript dialog and it's a bit difficult to understand what happens next.

Is there a way to log and make visible all HTTP communication with the first IT system? With that I mean obtain the following:

  • I use a browser to log into the first system and make the edits/changes.
  • The logger runs in parallel and in the end shows which GET and POST requests and parameters and their values were sent and to which URLs

Source