Results 1 to 3 of 3

Thread: Quick Question: Include An External Page?

  1. #1

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065

    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
    Wayne

  2. #2

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065
    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
    Wayne

  3. #3
    New Member
    Join Date
    Sep 2002
    Location
    The World of Xeen
    Posts
    14
    Yep, including @ before a command will suppress any error messages. You might want to try
    PHP Code:
    set_time_limitint 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
  •  



Click Here to Expand Forum to Full Width