#1
  1. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    OK, I have just set up a primitive type of file-tracking on my page in PHP, whereby every time someone loads a wallpaper from my site, it increases the number held in a text file by one. So say the wallpaper was called foo.jpg, it would add one to the value of foo.jpgcount (no . in between notice, I couldn't get it to put a . in there!). So what I need is a PHP script which will get all the files whose names have the last five letters count, and write their values into an HTML page, with the first part of the file name next to it. eg:

    foo.jpg 10
    f002.jpg 22

    and so on. I can format this to draw a kind of bar chart with the results using a table. etc. etc.

    Could someone please help me out with this as I don't know how!

    Thanks in advance,

    ------------------------------------------
    Alex
    (http://www.alex-greg.co.uk)
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    exactly how is the data formatted in the text file ' 10,foo1.jpgcount ' etc?

    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL
  4. #3
  5. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    The file contains one thing: the number of times that file has been downloaded. So the file's contents would just be 10 or 2 or whatever (no line breaks)

    -------------------------------------------
    Alex
    (http://www.alex-greg.co.uk)

IMN logo majestic logo threadwatch logo seochat tools logo