Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2009-05-12, 07:28 PM   #9
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
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:28 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc