Thread: Web script: real time clock

  1. #1
    unleashed alphaoide's Avatar
    Join Date
    Sep 2003
    Posts
    696

    Web script: real time clock

    If I have a script on my webpage which displays the time in real-time (updates every second), does it eat up my bandwith?
    thnx
    source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    No. If its like any other clock script the user's browser is the one doing the work. Unless of course you have it setup to refresh to get the time change.

    Btw you may want to use @ infront of your include() to disable to error message on the page in your signature

  3. #3
    unleashed alphaoide's Avatar
    Join Date
    Sep 2003
    Posts
    696
    Quote Originally Posted by Thantos
    Btw you may want to use @ infront of your include() to disable to error message on the page in your signature
    Huh??
    source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense

  4. #4
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    Have you done this yet? (what Thantos said)

    If not, putting the @ symbol in front of a PHP function will suppress error messages if errors occur. It makes your site more friendly if something bad happens (heaven forbid).

  5. #5
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Sorry didn't noticed that you replied alphaoide or I would have explained.

    Thanks ober for covering my arse

    For things that reveal internal directory structures or sensative info in the error message I like to put @ in front of the commands.

    Also it lets you be lazy. Say you want to have a news/update file and include it if its present, then you can do a @include on it and if its present then you get the update, if its not then you don't have an error message

  6. #6
    unleashed alphaoide's Avatar
    Join Date
    Sep 2003
    Posts
    696
    kewl, thanks for the tips guys.
    source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense

  7. #7
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    yeah you'll run into stuff constantly that will throw an error (especially in self checking forms) where a variable is used but not declared until the form is submitted. At that point using the @ symbol will keep it from displaying the unnecessary error message.

    just thought i'd add my 2 cents
    PHP and XML
    Let's talk about SAX

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Segmentation Fault :(
    By DarkDot in forum C++ Programming
    Replies: 39
    Last Post: 04-07-2007, 04:16 AM
  2. Programming Puns
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 44
    Last Post: 03-23-2002, 04:38 PM
  3. how to make the prog. read time from pc clock
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 01-16-2002, 03:50 PM
  4. time class
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2001, 10:12 PM
  5. Real Time?
    By Sebastiani in forum C Programming
    Replies: 1
    Last Post: 09-23-2001, 03:33 PM