Getting file from local filesystem after being parsed by PHP
Posted: Fri Mar 02, 2007 6:10 am
I am writing a script to 'flatten' (create a static version of) dynamic pages.
I want to get a php file from the local filesystem BUT I want PHP to parse and execute the file before returning it.
Similar to file_get_contents() but instead of returnin ghte php source code, I want it to process it and return the resulting page.
Any ideas?
I am currently using cURL which works, but uses up masses of bandwidth as it gets the file by absolute URL going out and back in through the firewall (I think).
I want to get a php file from the local filesystem BUT I want PHP to parse and execute the file before returning it.
Similar to file_get_contents() but instead of returnin ghte php source code, I want it to process it and return the resulting page.
Any ideas?
I am currently using cURL which works, but uses up masses of bandwidth as it gets the file by absolute URL going out and back in through the firewall (I think).