tags:

views:

37

answers:

1

I create a page called "blank" located at http://www.mysite.com/blank

How can I download this page and get it as an HTML string in PHP? I know the PHP "file_get_contents" function could do the trick, but I would prefer a way where Drupal's API generated page with node ID X, and I can just grab the whole page generated as an HTML string.

Anyone know how to do this?

+2  A: 

I think you are asking to call a Drupal page from within Drupal. This won't work via code alone as Drupal uses global variables and the path when generating the page. Best to use HTTP to request the page and use the result.

Jeremy French