I'm using the MVC framework CodeIgniter for my work, if it's relevant.
In one of my pages/controllers, I want to capture the HTML outputted by another page on the site as a string (to use as an email or newsletter). I tried:
$string = file_get_contents('http://www.examplesite.com/path/to/page');
But $string
just becomes false
, which the documentation says means it failed. I must be missing something tragic...