View Single Post
Old 2009-05-12, 07:28 PM   #6
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Quote:
Originally Posted by nate View Post
echo @stripslashes( @join( @file( "http://www.somedomain.com/cgi-bin/someperl.cgi" ),"" ));
realizing of course that if maxclients is set to 512, and you have 257 surfers hitting a page that is calling that url from your local server, you're going to get a connection refused on the 257th surfer's request. Since php doesn't support keepalives, do that more than once on a page and you've got 1+ a connection for each of the file requests, reducing the number of surfers that you can serve on your site.

And that doesn't really solve the problem. If a file is being included, sure, that will work, though,

Code:
echo @file_get_contents('http://www.somedomain.com/cgi-bin/someperl.cgi');
is a bit friendlier, and, honors the timeout timer built into php. file, if I recall, does not honor the default_socket_timeout. Neither does include/include_once or require/require_once.

If it is a local file, you're better off doing:

Code:
echo @file_get_contents('/path/to/localfile.html');
But, how do you handle normal SSI?

Code:
        <!--#config timefmt="%A %B %d, %Y" -->
        Today is <!--#echo var="DATE_LOCAL" -->
Without converting that code to php, you would have to add the output filter for INCLUDES. SSI is used for more than including other files including adding the query string to urls, displaying the current date, etc.

In the end, SSI wasn't used, so, it's a moot point.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote