|
-
Dec 1st, 2002, 07:36 PM
#1
Thread Starter
Frenzied Member
Quick Question: Include An External Page?
PHP Code:
<?php
$site = fopen("http://www.topsitelists.com/world/toppalaces/topsites.html", "r") or die("<html>\n<body>\nError Including Website: Top Palace Lists<BR>Please Contact The Admin!\n</body>\n</html>");
while($site){
$page = fgets($site);
echo $page;
}
@fclose($site);
?>
This is the code i am using to get an external web-page,
Anyhow:
Code:
Fatal error: Maximum execution time of 30 seconds exceeded in e:\servers\root\websoftware\toppalaces\index.php on line 5
I am getting this error just before the </body> </html> is added to the page, so,, is there an easier & Faster way to show an external page?
& If that is the best that can b done, What time do you ppl suggest i raise the time limit to?
: Ta
-
Dec 1st, 2002, 09:59 PM
#2
Thread Starter
Frenzied Member
PHP Code:
<?php
$site = @fopen("http://www.topsitelists.com/world/toppalaces/topsites.html", "r") or die("<html>\n<body>\nError Including Website: Top Palace Lists<BR>Please Contact The Admin!\n</body>\n</html>");
while($site){
$page = @fgets($site);
echo $page;
}
@fclose($site);
?>
Added the extra @ sign's infront of fgets & fopen, & now it cancels the error,
But if ne 1 has a better way, still like to no it 
tnx
-
Dec 20th, 2002, 06:37 PM
#3
New Member
Yep, including @ before a command will suppress any error messages. You might want to try
PHP Code:
set_time_limit( int seconds )
Documentation is here:
http://www.php.net/manual/en/functio...time-limit.php
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|