I am struggling to create a pdf file with tcpdf from a dynamically generated page.
My problem is that I've got a logging session and when accessing the file it gets only the credentials if you're not logged in.
So my bit for collecting the html is:
$curl_handle=curl_init();
curl_setopt($curl_handle, CURLOPT_URL,'http://www.domain.com/subdir/index.php?something=ref');
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_USERAGENT, 'Your application name');
$html = curl_exec($curl_handle);
curl_close($curl_handle);
So what I've got after running it, is 'HTTP Error 401: - Unauthorised'.
I hope my explanation makes sense.
Any help will be much appreciated!