I have a PHP page that gets its content by making an HTTP request to another site on the same server, using file_get_contents
. Both sites run in Apache 2 which calls PHP using suPHP (which is FastCGI, right?)
How significant is the overhead of this call? Does Apache do a lot of processing before sending a request to PHP?
An alternative way to make the call would be for the first site to exec('php /the/other/script.php some parameters')
. Would this be faster, or is the overhead of spawning a process bigger than that of going through Apache?