I need help with saving out put from a php page. There are two pages. One is a form page and one is a page which processes the form. I don't have access the page which processes the form but the that page returns the output for whatever I submit using the form page. What I want to do is to save the resulted output from the second page once someone clicks on the submit button. This output should be saved to the xml file in the local directory. NOTE: I dont' have access to the second page...it only returns the output for whatever i submit from the first page (form). Thanks. Any help will greatly be appreciated.
I suppose CURL can be used to submit user data to second page. In short - you get user data, submit it to the second page with curl functions (or snoopy class if you don't have curl on your host installed) and grab output. If needed you show this output back to user.
just use the @ob_start(); Code (markup): function before any output, then add this code at the end: $pagesource=ob_get_contents(); ob_end_flush(); $fd = fopen ("output.html", "w"); fwrite ($fd, $pagesource); fclose($fd); Code (markup): the output should be saved in the output.html file.