Script to help stop people using bandwidth

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hoops

    Script to help stop people using bandwidth

    Does anyone have a good java script that I can add to my page so that
    the same user doesn't pound my site and use all of my bandwidth?


    Any help would be appreciated..
  • Randy Webb

    #2
    Re: Script to help stop people using bandwidth

    Hoops wrote:
    [color=blue]
    > Does anyone have a good java script that I can add to my page so that
    > the same user doesn't pound my site and use all of my bandwidth?[/color]

    And if the user has javascript disabled?

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    • Fabian

      #3
      Re: Script to help stop people using bandwidth

      Hoops hu kiteb:
      [color=blue]
      > Does anyone have a good java script that I can add to my page so that
      > the same user doesn't pound my site and use all of my bandwidth?[/color]

      Javascript cant do that.


      --
      --
      Fabian
      Visit my website often and for long periods!


      Comment

      • Robert

        #4
        Re: Script to help stop people using bandwidth

        In article <4kupk0dcpf2dqd 1gvficcs3g2350o i1ake@4ax.com>,
        Hoops <hoop_nospam@ya hoo.com> wrote:
        [color=blue]
        > Does anyone have a good java script that I can add to my page so that
        > the same user doesn't pound my site and use all of my bandwidth?
        >
        >
        > Any help would be appreciated..[/color]

        Do you have an URL?

        Why don't you want people using your site? Perhaps you can sell some
        advertisement.

        What do you wish to prevent?

        Perhaps you can put up an intro page that is text only with link to your
        'real' home page. Remove as many images as you can from your home page.

        Put a password on your site.

        Robert

        Comment

        • Dr John Stockton

          #5
          Re: Script to help stop people using bandwidth

          JRS: In article <4kupk0dcpf2dqd 1gvficcs3g2350o i1ake@4ax.com>, dated
          Sat, 18 Sep 2004 20:20:17, seen in news:comp.lang. javascript, Hoops
          <hoop_nospam@ya hoo.com> posted :
          [color=blue]
          >Does anyone have a good java script that I can add to my page so that
          >the same user doesn't pound my site and use all of my bandwidth?[/color]

          If the user is not both malicious and intelligent, it is likely that he
          will have javascript and cookies enabled.

          If so, maybe get each page to set a cookie early on, with usage count
          and short expiry. If the count is too high, redirect with script
          location.href=< elsewhere>

          If the user may be trying to defeat caching, check to see if there is a
          ? in the URL, and if so redirect.

          Redirect to a page of minuscule bandwidth; I use an empty file.


          If, however, you wish to protect against one who knows as much as Jim &
          others, your only hope is to delete all your files from the server.

          --
          © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk DOS 3.3, 6.20; Win98. ©
          Web <URL:http://www.merlyn.demo n.co.uk/> - FAQqish topics, acronyms & links.
          PAS EXE TXT ZIP via <URL:http://www.merlyn.demo n.co.uk/programs/00index.htm>
          My DOS <URL:http://www.merlyn.demo n.co.uk/batfiles.htm> - also batprogs.htm.

          Comment

          • Andrew Thompson

            #6
            Re: Script to help stop people using bandwidth

            On Sun, 19 Sep 2004 17:50:56 +0100, Dr John Stockton wrote:
            [color=blue]
            > If, however, you wish to protect against one who knows as much as Jim &
            > others, your only hope is to delete all your files from the server.[/color]

            I was waiting for somebody to say that.. ;-)

            Comment

            • kaeli

              #7
              Re: Script to help stop people using bandwidth

              In article <4kupk0dcpf2dqd 1gvficcs3g2350o i1ake@4ax.com>,
              hoop_nospam@yah oo.com enlightened us with...[color=blue]
              > Does anyone have a good java script that I can add to my page so that
              > the same user doesn't pound my site and use all of my bandwidth?
              >
              >
              > Any help would be appreciated..
              >[/color]

              You can't use javascript for this.

              Get a good server, either Apache or IIS (if you're stuck and can't get Apache
              *g*).
              Assuming Apache, learn how to look at your log files. Get the IP address of
              the person(s) doing this. Put that in a .htaccess file to deny them access at
              all.
              Learn a decent server-side scripting language, such as Perl, that can parse
              your log file. Set that up to look daily at your log files, get the IP
              address(es) of anyone using too much bandwidth (you'd have to decide how much
              is too much), and have it edit the htaccess file accordingly.

              Anyway, that's what I'd do. :)

              This assumes you have the ability to set cron jobs and look at log files,
              which my host does allow. If yours doesn't, move hosts if you can. My host
              isn't pricey or anything.

              --
              --
              ~kaeli~
              Acupuncture is a jab well done.



              Comment

              • kaeli

                #8
                Re: Script to help stop people using bandwidth

                In article <4kupk0dcpf2dqd 1gvficcs3g2350o i1ake@4ax.com>,
                hoop_nospam@yah oo.com enlightened us with...[color=blue]
                > Does anyone have a good java script that I can add to my page so that
                > the same user doesn't pound my site and use all of my bandwidth?
                >
                >
                > Any help would be appreciated..
                >[/color]

                I forgot to add that I think that search spiders do use your bandwidth, so if
                you have heavy pages, you may want to add code in there to stop the nicer
                ones from indexing the heavy pages. Note that this will decrease your ratings
                in some engines, though.

                --
                --
                ~kaeli~
                Acupuncture is a jab well done.



                Comment

                • Randy Webb

                  #9
                  Re: Script to help stop people using bandwidth

                  kaeli wrote:[color=blue]
                  > In article <4kupk0dcpf2dqd 1gvficcs3g2350o i1ake@4ax.com>,
                  > hoop_nospam@yah oo.com enlightened us with...
                  >[color=green]
                  >>Does anyone have a good java script that I can add to my page so that
                  >>the same user doesn't pound my site and use all of my bandwidth?
                  >>
                  >>
                  >>Any help would be appreciated..
                  >>[/color]
                  >
                  >
                  > You can't use javascript for this.
                  >
                  > Get a good server, either Apache or IIS (if you're stuck and can't get Apache
                  > *g*).
                  > Assuming Apache, learn how to look at your log files. Get the IP address of
                  > the person(s) doing this. Put that in a .htaccess file to deny them access at
                  > all.
                  > Learn a decent server-side scripting language, such as Perl, that can parse
                  > your log file. Set that up to look daily at your log files, get the IP
                  > address(es) of anyone using too much bandwidth (you'd have to decide how much
                  > is too much), and have it edit the htaccess file accordingly.[/color]

                  That works good and predictably with static IP addresses. What about
                  Dynamic IP Addresses? I can connect to a site with AOL, reboot, go back
                  to the same site and have a different IP Address.


                  --
                  Randy
                  comp.lang.javas cript FAQ - http://jibbering.com/faq

                  Comment

                  • Grant Wagner

                    #10
                    Re: Script to help stop people using bandwidth

                    Randy Webb wrote:
                    [color=blue][color=green]
                    > > Assuming Apache, learn how to look at your log files. Get the IP address of
                    > > the person(s) doing this. Put that in a .htaccess file to deny them access at
                    > > all.
                    > > Learn a decent server-side scripting language, such as Perl, that can parse
                    > > your log file. Set that up to look daily at your log files, get the IP
                    > > address(es) of anyone using too much bandwidth (you'd have to decide how much
                    > > is too much), and have it edit the htaccess file accordingly.[/color]
                    >
                    > That works good and predictably with static IP addresses. What about
                    > Dynamic IP Addresses? I can connect to a site with AOL, reboot, go back
                    > to the same site and have a different IP Address.[/color]

                    Another problem with the technique of simply denying access to the IP Address of a
                    host that is making an excessive number of requests is that a lot of ISPs offer
                    proxy servers to their customers. As a result, a Web site may see a lot of traffic
                    from a specific IP address (the proxy server). Denying access to your site from
                    that proxy's IP Address could potentially reduce your audience by several thousand
                    people.

                    --
                    Grant Wagner <gwagner@agrico reunited.com>
                    comp.lang.javas cript FAQ - http://jibbering.com/faq

                    Comment

                    • kaeli

                      #11
                      Re: Script to help stop people using bandwidth

                      In article <KeidnaawW6vFnt LcRVn-qw@comcast.com> , HikksNotAtHome@ aol.com
                      enlightened us with...[color=blue]
                      > That works good and predictably with static IP addresses. What about
                      > Dynamic IP Addresses? I can connect to a site with AOL, reboot, go back
                      > to the same site and have a different IP Address.
                      >[/color]

                      That's why the cron runs and changes the htaccess file daily.
                      Access is only blocked for a day. If they stop it, they get access again
                      tomorrow. If they keep pushing it, well, they're banned again.

                      --
                      --
                      ~kaeli~
                      Profanity: the single language in which all programmers are
                      expert.



                      Comment

                      • kaeli

                        #12
                        Re: Script to help stop people using bandwidth

                        In article <414F143B.91432 137@agricoreuni ted.com>, gwagner@agricor eunited.com
                        enlightened us with...[color=blue]
                        >
                        > Another problem with the technique of simply denying access to the IP Address of a
                        > host that is making an excessive number of requests is that a lot of ISPs offer
                        > proxy servers to their customers. As a result, a Web site may see a lot of traffic
                        > from a specific IP address (the proxy server). Denying access to your site from
                        > that proxy's IP Address could potentially reduce your audience by several thousand
                        > people.
                        >[/color]

                        That's one I didn't think of, and it would be a concern if my site were a
                        commercial one.

                        Since it isn't, it's not. :)

                        But, great point.

                        Of course, if you knew, or suspected, such a thing, you could alway allow
                        traffic from the proxies, but then you leave yourself open to the abusers
                        using those proxies.

                        I was kind of under the impression that the OP's site was not a commercial
                        one and he rather knew, or had a good idea, of who the abuser was, if not
                        personally, then by the IP addy.

                        I do wonder, though, b/c I use a proxy here at work, but when sites get my
                        IP, it's really my IP, not my proxy server. I've checked. Is this a setting
                        on the proxy?

                        --
                        --
                        ~kaeli~
                        Profanity: the single language in which all programmers are
                        expert.



                        Comment

                        • Randy Webb

                          #13
                          Re: Script to help stop people using bandwidth

                          kaeli wrote:
                          [color=blue]
                          > In article <414F143B.91432 137@agricoreuni ted.com>, gwagner@agricor eunited.com
                          > enlightened us with...
                          >[color=green]
                          >>Another problem with the technique of simply denying access to the IP Address of a
                          >>host that is making an excessive number of requests is that a lot of ISPs offer
                          >>proxy servers to their customers. As a result, a Web site may see a lot of traffic
                          >>from a specific IP address (the proxy server). Denying access to your site from
                          >>that proxy's IP Address could potentially reduce your audience by several thousand
                          >>people.
                          >>[/color]
                          >
                          >
                          > That's one I didn't think of, and it would be a concern if my site were a
                          > commercial one.
                          >
                          > Since it isn't, it's not. :)
                          >
                          > But, great point.
                          >
                          > Of course, if you knew, or suspected, such a thing, you could alway allow
                          > traffic from the proxies, but then you leave yourself open to the abusers
                          > using those proxies.
                          >
                          > I was kind of under the impression that the OP's site was not a commercial
                          > one and he rather knew, or had a good idea, of who the abuser was, if not
                          > personally, then by the IP addy.[/color]

                          I guess I am in a small group, as I have both a dynamic and static IP
                          address available to me at any given time (AOL and my Cable).
                          [color=blue]
                          > I do wonder, though, b/c I use a proxy here at work, but when sites get my
                          > IP, it's really my IP, not my proxy server. I've checked. Is this a setting
                          > on the proxy?[/color]

                          Yes.

                          --
                          Randy
                          comp.lang.javas cript FAQ - http://jibbering.com/faq

                          Comment

                          Working...