chriso20 Posted February 16, 2009 Share Posted February 16, 2009 Hey, Is there any way of requesting and storing the HTML output of that requested page in PHP? I seem to remember a function i used to use in coldFusion for verifying a successful payPal payment, it checked if the page's first 7 characters were "SUCCESS". Any ideas? Ideally i'd like to display a webpage on my site, completely from another site, and rewrite parts of it, for example replacing "cheese" with "apples" and have the page display exactly the same (my site's URL of course) as the original, except for my word replacement. Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/145401-solved-request-rewite-and-print-other-web-pages/ Share on other sites More sharing options...
chriso20 Posted February 16, 2009 Author Share Posted February 16, 2009 Could PHP's output buffer be used? I can't work out how this might be used if it can be... thanks in advance again! Quote Link to comment https://forums.phpfreaks.com/topic/145401-solved-request-rewite-and-print-other-web-pages/#findComment-763333 Share on other sites More sharing options...
Mchl Posted February 16, 2009 Share Posted February 16, 2009 Look into curl extension Quote Link to comment https://forums.phpfreaks.com/topic/145401-solved-request-rewite-and-print-other-web-pages/#findComment-763376 Share on other sites More sharing options...
.josh Posted February 16, 2009 Share Posted February 16, 2009 Or file_get_contents and use preg_replace or str_replace. Quote Link to comment https://forums.phpfreaks.com/topic/145401-solved-request-rewite-and-print-other-web-pages/#findComment-763378 Share on other sites More sharing options...
chriso20 Posted February 16, 2009 Author Share Posted February 16, 2009 cURL and file_get_contents() look like they'll do the job nicely! Thanks for your help! Quote Link to comment https://forums.phpfreaks.com/topic/145401-solved-request-rewite-and-print-other-web-pages/#findComment-763391 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.