I'm mworking on a Drupal site for which I need to export page content into PDFs. The URLs generating the pdfs are all working correctly but when I attempt to use the file_get_contents function to retrieve the page contents from http://localhost:81/export/58/pdf, it returns false indicating a failure of the function.
Similarly, I attempted using curl following examples such as this but I encounted similar issues i:e the generated pdfs where entirely empty.
I then tried a random url off the internet and I was able to get results using curl and file_get_contents.
Googling a lot, I found posts indicating allow_url_fopen needs to be ON (which it was), openssl needs to be enabled (which it was). Also, there was a post about a firewall potentially blocking things. I disabled the Windows Firewall but things still have not changed.
The potential added complication is that my Drupal site that the Drupal site is being powered from Docker. I'm not sure how that might be affecting things.