aximbigfan Posted March 17, 2008 Share Posted March 17, 2008 I was just thinking about some cool things that may or may not be do able in PHP. One thing I though of, is, is there a function so that multiple PHP scripts can talk to each other, to plot to take over the world Exchange data? for example, something like this: if (call_php("http://echo/echo.php$getvars")=="true"){ echo "hello!";} Chris Link to comment https://forums.phpfreaks.com/topic/96500-2-or-more-php-scripts-talking-to-each-other/ Share on other sites More sharing options...
trq Posted March 17, 2008 Share Posted March 17, 2008 Do you mean include()? Link to comment https://forums.phpfreaks.com/topic/96500-2-or-more-php-scripts-talking-to-each-other/#findComment-493858 Share on other sites More sharing options...
redarrow Posted March 17, 2008 Share Posted March 17, 2008 is he on about a function on a function.page then included dont no.......... Link to comment https://forums.phpfreaks.com/topic/96500-2-or-more-php-scripts-talking-to-each-other/#findComment-493861 Share on other sites More sharing options...
aximbigfan Posted March 17, 2008 Author Share Posted March 17, 2008 No, not include, something where the pages can actively talk. Like maybe one script calling a php page, but as it would if a client was requesting it, so instead of code, it is getting something the page generates. Chris Link to comment https://forums.phpfreaks.com/topic/96500-2-or-more-php-scripts-talking-to-each-other/#findComment-494069 Share on other sites More sharing options...
trq Posted March 17, 2008 Share Posted March 17, 2008 Um, that is exactly what include does. Executes the script and includes the results. If you'd like to capture the output into a variable you'd need to use output buffering. eg; <?php ob_start(); include 'file.php'; $out = ob_get_contents(); ob_end_clean(); echo $out; ?> Link to comment https://forums.phpfreaks.com/topic/96500-2-or-more-php-scripts-talking-to-each-other/#findComment-494135 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.