Page 1 of 1

File parsing causing latency

Posted: Fri Jun 06, 2003 2:00 am
by FredEH
Hi,

I have been having a problem with my website loading VERY slow. By trial and error, I was able to find that any time I use code like this:

Code: Select all

<?php
$include = 'http://www.whatever.com/header.php';
$include_output = implode('', file($include));
?>
My site bogs way down. Could this be a problem with my host? Or is this a common problem when using this type of code

Thanks in advance

Posted: Fri Jun 06, 2003 2:12 am
by volka
depends on the size of the document, the time it takes to contact the other site and the transfer bandwidth.

Posted: Fri Jun 06, 2003 2:15 am
by FredEH
What if it is the same site and its just a small header file?

Posted: Fri Jun 06, 2003 2:15 am
by volka
then why do you read it via http?

Posted: Fri Jun 06, 2003 2:18 am
by FredEH
Well... because i'm using it for my phpbb and the header file is not in a relative path.

Posted: Fri Jun 06, 2003 8:56 am
by Gleeb
All paths on the same physical server are relative. don't forget about ..