Grab the file using a script that is run by Cron, assuming your are on a
Linux type system. Grab it every 5 minutes or something. Store/cache it
on your web server. Then when you need the file in your other script,
grab it from the place where you've cached it. You're script can then
get the content almost instantly! 

Matt Friedman
 

-----Original Message-----
From: Joseph Then [mailto:[EMAIL PROTECTED]] 
Sent: Saturday May 4, 2002 10:03 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Slow in retriveing webpage

Hi!
I want to grab a webpage and I use the file() function to grab it.

The URL in the file() function works OK when I typed it in my address
bar.
The speed is OK.

$fcontents = file
("http://www.website.com/cgi-bin/cgifunction/webpage.cgi";);

However, when I use the above code and tried to run the PHP file, I have
to
wait for 10 seconds before I get any results.

I tried to isolate the problem and realised that the slowing down
portion is
the above line. I tried fopen() and the results is still the same.


I need to know if it is possible to speed up the above process.

If possible, please email me at [EMAIL PROTECTED]

Thank you for any help rendered.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to