473,545 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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..
Jul 23 '05 #1
12 1458
Hoops wrote:
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?


And if the user has javascript disabled?

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #2
Hoops hu kiteb:
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?


Javascript cant do that.
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 23 '05 #3
In article <4k************ *************** *****@4ax.com>,
Hoops <ho*********@ya hoo.com> wrote:
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..


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
Jul 23 '05 #4
JRS: In article <4k************ *************** *****@4ax.com>, dated
Sat, 18 Sep 2004 20:20:17, seen in news:comp.lang. javascript, Hoops
<ho*********@ya hoo.com> posted :
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?


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.
Jul 23 '05 #5
On Sun, 19 Sep 2004 17:50:56 +0100, Dr John Stockton wrote:
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.


I was waiting for somebody to say that.. ;-)
Jul 23 '05 #6
In article <4k************ *************** *****@4ax.com>,
ho*********@yah oo.com enlightened us with...
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..


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.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #7
In article <4k************ *************** *****@4ax.com>,
ho*********@yah oo.com enlightened us with...
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..


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.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #8
kaeli wrote:
In article <4k************ *************** *****@4ax.com>,
ho*********@yah oo.com enlightened us with...
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..

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.


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
Jul 23 '05 #9
Randy Webb wrote:
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.


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.


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 <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq

Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
24962
by: Tammy | last post by:
What would be a good alternative to using frames? I need something that will section my webpage into two halves and can change both frames on a single click. Thanks in Advance, Tammy
2
2128
by: . . | last post by:
Hi I need some help with java script . I have a ASPX page that is pulling a user message heading from the table on the page . The user message header has message body which suppose to dispay under the heading when a user click on the message header . Message body will come from database table .The different message header has different...
0
3207
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. ...
15
2268
by: Fergus Cooney | last post by:
Hi Everyone, I finished playing newgroupie this morning and went to bed. When I came back, I couldn't get any new messages for this group. I'm using Outlook Express. It showed the newsgroup highlighted in the Folder View with the number of new messages in brackets. When I went into the folder, however, it just sat there and wouldn't go get...
3
2468
by: rsteph | last post by:
I have a script that shows the time and date. It's been working on my site for quite a while now. Suddenly it stops showing up, after getting my drop down menu to work. If I put text between the <div id="datetime"></div> tags, the text shows up, but the javascript output being sent to those some divs doesn't seem to want to work. It should be...
51
4090
by: Ojas | last post by:
Hi!, I just out of curiosity want to know how top detect the client side application under which the script is getting run. I mean to ask the how to know whether the script is running under Command Prompt or Browser or some other application? Ojas.
118
4558
by: Chuck Cheeze | last post by:
This might be in the wrong group, but... Here is an example of my data: entry_id cat_id 1 20 2 25 3 30 4 25 5 35
0
7425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7682
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7935
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7780
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6009
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5351
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5069
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1037
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.