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! 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! 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 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. 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! 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
Archived
This topic is now archived and is closed to further replies.