Important Note: Even though it's not against their terms of service as a government institution, the ministry of finance's website uses a form of javascript detection known as "bobcmn" to block web scrapers. I have not yet managed to find a way to reverse engineer bobcmn in order to bypass it, nor have I managed to make it work with a headless browser. This means you will have to manually go to http://mfinante.ro/infocodfiscal.html?cod=6859662, capture the cookies with something like Postman Interceptor and add them to the config/config.php file. The code will not work with the default cookies in the config file as they are ip and time dependent. If anyone finds a way to reverse engineer bobcmn or find a way to bypass it with a headless browser, please let me know.