What script can passthru the full response from an executable, which might be slightly delayed responding?..
The executable I’m looking to fetches a webpage and I want that passed to the browser, as the full response.
This should be simple but hitting the edge of what I know.
Here defaulting to expecting php can handle this… but open to any robust solution.
What I have so far works, for what is a prompt response on the Version detail but then not the useful response, which atm is slightly delayed. So, wanting the php to hold until received.
This a dirty cluster of me guessing everything I know…
<?php ob_start(); ?><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <p> <?php passthru("./safe -V"); echo "</p><p>"; passthru("./safe cat safe://hello/index.html"); ?> </p> </body> </html><?php $size=ob_get_length(); header("Content-Length: $size"); ob_end_flush(); ?>
but the output is simply the version answer and not the other content.
and I have that executable then in /var/www space and given it works for -V access to that not the issue but the delay handling is??..
#offtopic Motivation is that I wonder this would allow safe://website.somedomain to be accessible as h ttp://website.somedomain and a powerful option then going forward, with body content in SAFE and header fixing the http visibility. See h ttps://safenetwork.tech/ for more of what this is.
Point above, still is relative to any executable that is delayed?.. how do I get php to wait??.. timeout isn’t working and seems like the wrong direction to look; so, what other options…