Converting a password protected web page to pdf

I have to convert my web page to pdf in php. I googled and found several leads. http://pdfcrowd.com/web-html-to-pdf-php/ How to convert a PHP web page to PDF? However, my web page is password protected. Is there a way a script can login (of course, the credentials will be provided) and then after successful login, convert the web page to html. Is the above even possible? If yes, can someone give me some suggestions. If not, are there any alternate ways to do it? Thanks

1 1 1 silver badge asked Apr 8, 2014 at 17:02 6,230 23 23 gold badges 70 70 silver badges 101 101 bronze badges

updated answer below: PDFmyURL allows you to log in to your members area and can then access all those pages for conversion to PDF

Commented Sep 10, 2015 at 8:51

5 Answers 5

You may retrieve the page (pdf) contents using php curl with basic http auth.

1 1 1 silver badge answered Apr 8, 2014 at 17:11 16.7k 3 3 gold badges 31 31 silver badges 45 45 bronze badges No problem. If it solves it for you, please check my answer as correct. Commented Apr 9, 2014 at 18:09

Our PDFmyURL API allows you to login and convert the page to PDF. We support many different standard ways that your page can be protected, so you don't need to build any new way specifically for our API.

You can find the documentation on accessing content in secure members area at the PDFmyURL.com API documentation page

EDIT: in september 2015 we added functionality that allows you to log in to your members area directly from our own members area. All our tools (the API and also manual conversions) will then be able to access your members area pages without any problems.