Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003

    php counter service

    I want to make a website counter, called through javascript. I have the following question:

    what is better/faster/less cpu intensive, to call visitor's number from mysql and write it to image with imagemick or maybe gd library
    have small pictures of every number, then group them together into a single image file, so I get one image with visitor number.

    In both cases we ahve only 1 file to load.

    on 1st example we covert a number into a picture;
    in 2nd we group small pics on server together into one picture, then send it to site. In 2nd option we can have nicer counters.

  2. #2
    Join Date
    Mar 2004
    Granville OH
    I would generate the images on the fly. Storing every single number is a bit absurd. Especially if you become popular.

    Something to look into would be creating an image for 000-999, 00-99, 0-9 and then appending them to each other using a delimeter ("," in the US). That way you can have your nice antialiased, spaced images without having 4 million files to sift through.

Posting Permissions

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