If curls are included (they are by default), you can use:
file_get_contents('http://www.example.org');
Please note that this happens synchronously, so your page will not be either until the request is complete. It would be better to register access to the log file (or database) and periodically export the data. In addition, you can complete the request after completing your page, and the output has been sent to the client.
source
share