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
Subject: [PHP] Slow in retriveing webpage

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
The speed is OK.

$fcontents = file

However, when I use the above code and tried to run the PHP file, I have
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 (
To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to