Bit of Code needed.

Discussion in 'Web Design & Coding' started by Lee, May 17, 2004.

  1. Lee

    Lee OSNN Proxy

    I need a bit of code (as my web server don't provide stats) that will sit in my upper directory and will write to a .txt I have in that directory , hits, browsers used, how long they're there for etc...

    Also some script to block certain i.s.p's and areas of the World, like asia, africa and the middle east.

    Thanks in advance
  2. Glaanieboy

    Glaanieboy Moderator

    The Netherlands
    a bit of code :eek: Anyway, what language do you want? Do you want PHP, ASP, CGI? And the part of where you talk about blocking areas of the world is virtually impossible, you can't just block out a continent, not even a country. Unless that country only has one ISP, then you can block that ISP. And even if you can block ISP's, it isn't a 100% protection. If someone really wants, they can visit you site by spoofing their IP or by using a service like
  3. Lee

    Lee OSNN Proxy

    html firstly.

    I did read that you can block certain areas of the world, like msn block us users from United Kingdom using chat rooms on msn.
  4. Grandmaster

    Grandmaster Electronica Addict Political User Folding Team

    Santa Clara, CA
    Just a question, why would you want to block countries?
  5. Lee

    Lee OSNN Proxy

    The information is irrelevant for ne1 else that isn't in the United Kingdom.
  6. Geffy

    Geffy Moderator Folding Team

    United Kingdom
    you still dont really need to block other countries, you can also get brits or people with british friends visiting from other countries

    btw the only way I know of blocking IP ranges, is either through a firewall or maybe the .htaccess file

    regarding the script, I would probably recommend PHP, you can fairly easily record the browsers and the IP address, but if you want to record the length of time that they are there for you will probably need to use something like sessions.

    What OS does your server use, with *nix could you not just stick something like awstats on there? as far as I know its a perl thinger, but I havent ever tried to install it before so I dont know if you need to have root access.
  7. ZeroHour

    ZeroHour ho3 ho3 ho3