Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Sep 2003
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    My template system is slow...

    PHP Code:
    $string phpnetfile_get_contents("./templates/$template/template.php"); 

    // LMENU
    $patterns[] = "/{ACWB_LMENU}/"ob_start(); if (file_exists("$lmenu")) { include("$lmenu"); } $contents[] = ob_get_contents(); ob_end_clean();

    // RMENU
    $patterns[] = "/{ACWB_RMENU}/"ob_start(); if (file_exists("$rmenu")) { include("$rmenu"); } $contents[] = ob_get_contents(); ob_end_clean();


    // Copyright
    $patterns[] = "/{ACWB_COPYRIGHT}/"$contents[] = "Website Backbone Version. 1.0.0 Copyright (C) 2003 <a href=\"http://www.acecoolco.com\" target=\"_blank\">Acecool Company</a>, Additional code + Fixes: <a href=\"mailto:Cozza2o@hotmail.com\">Rogue</a> - All rights reserved. <br>$copyright";
        
    print 
    preg_replace($patterns$contents$string); 
    Basically, people using a firewall, it loads like in minutes, people without it loads in a few seconds (normal)

    Any ideas?
    Last edited by Acecool; 09-20-2003 at 12:15 AM.

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    That would just be a coincidence as a firewall can have absolutely no effect on how fast the PHP engine parses your pages and sends them to the browser. By the time anything has been sent your firewall it has already completed being parsed by PHP so only HTML is being sent at that point.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If the problem is how long it takes people to view the pages then the slowness is more than likely to do with connections speeds (whether their modem speed or the speed/size of your host servers connection to main pipe).

    You're probably looking at a few microseconds for the script to be parsed/processed and then a variable number of seconds for the file(s) to be sent to the client.
    Ökii - formerly pootergeist
    teckis - take your time and it'll save you time.

  • #4
    New Coder
    Join Date
    Sep 2003
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well some people at a site are saying it loads fast, then people with firewalls say it loads in 2 minutes, 3 mins, 4 mins, 5 mins...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •