Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 10th, 2006, 1:26 AM   #11
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
That's why I'm the Supreme Ruler. :p
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
Mjordan2nd is offline   Reply With Quote
Old Apr 10th, 2006, 6:08 AM   #12
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Quote:
Blocking users by IP
Blocking bad bots and site rippers (aka offline browsers)
Preventing hot linking of your images and other file types
It's straining at a gnat to perceive of those things being client side functions. If you don't see that, then you don't understand the paradigm well. Informing you of that might be distasteful to you, but it's not an insult. I do have some spare ones lying around, if you want one.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Apr 10th, 2006, 7:38 AM   #13
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
To clarify a little:

Javascript is a client-side language. This means that it is executed not by your web server, but by the people accessing your web server. The browser executes the Javascript, not the server, and Javascript can thus be turned off at will.

Because of this, Javascript cannot block IPs, prevent hotlinking or do any of the things you wish. It simply can't be done by a client-side language.

Some of the things you wish to do can be done server-side, such as banning IPs and preventing hotlinking (via the Referer header), but some cannot. You cannot prevent a person from downloading content from your site. If they can view your page, they can save it. It's as simple as that.

I suggest you find a web hosting company that supports .htaccess files and PHP. Hosting companies that support such are cheap and plentiful. You can get a host for as little as $12 (or £7, or €10) a year.
Arevos is offline   Reply With Quote
Old Apr 13th, 2006, 1:45 PM   #14
demon101
Hobbyist Programmer
 
demon101's Avatar
 
Join Date: Mar 2006
Location: westboro, ohio
Posts: 159
Rep Power: 0 demon101 is an unknown quantity at this point
Send a message via Yahoo to demon101
you can to go to here for pw protect code

<script language="JavaScript">
<!--hide
var password;
var pass1="chef";
password=prompt('Password is chef',' ');
if (password==pass1)
alert('Correct password, OK to enter!');
else
{
window.location="http://www.help4admins.com";
}
//-->
</script>


and here code for blocking ips

this goes in your head
<script> 
function banned() 
{ 
var ip = '<!--#echo var="REMOTE_ADDR"-->'; 
var banned = 'ip address of Banned';} 
if (ip == banned) 
window.location = 'www.google.com'; 
</script>

place this one in your body
(<body onLoad="banned();">)
__________________
Demon101 Production's

Code Forums
demon101 is offline   Reply With Quote
Old Apr 13th, 2006, 3:56 PM   #15
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Put a code on your page, PM me your page address, and offer me $100.00 if I can post the code here.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Apr 16th, 2006, 9:04 AM   #16
demon101
Hobbyist Programmer
 
demon101's Avatar
 
Join Date: Mar 2006
Location: westboro, ohio
Posts: 159
Rep Power: 0 demon101 is an unknown quantity at this point
Send a message via Yahoo to demon101
i dont get what you are saying. i dont have my own page. i dont have the money to keep one. if i get a page it will be a free on. like freewebs or something.
__________________
Demon101 Production's

Code Forums
demon101 is offline   Reply With Quote
Old Apr 16th, 2006, 11:24 AM   #17
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
In that case, forget about doing any of that.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Apr 16th, 2006, 11:24 PM   #18
DBZ
Newbie
 
Join Date: Feb 2006
Posts: 22
Rep Power: 0 DBZ is on a distinguished road
Quote:
Originally Posted by demon101
you can to go to here for pw protect code

<script language="JavaScript">
<!--hide
var password;
var pass1="chef";
password=prompt('Password is chef',' ');
if (password==pass1)
alert('Correct password, OK to enter!');
else
{
window.location="http://www.help4admins.com";
}
//-->
</script>


and here code for blocking ips

this goes in your head
<script> 
function banned() 
{ 
var ip = '<!--#echo var="REMOTE_ADDR"-->'; 
var banned = 'ip address of Banned';} 
if (ip == banned) 
window.location = 'www.google.com'; 
</script>

place this one in your body
(<body onLoad="banned();">)
thxs your da best...
__________________
im a professional programmer
DBZ is offline   Reply With Quote
Old Apr 16th, 2006, 11:24 PM   #19
DBZ
Newbie
 
Join Date: Feb 2006
Posts: 22
Rep Power: 0 DBZ is on a distinguished road
Quote:
Originally Posted by DaWei
Put a code on your page, PM me your page address, and offer me $100.00 if I can post the code here.
im broke..... sorry, my page is www.cp-kc.com
__________________
im a professional programmer
DBZ is offline   Reply With Quote
Old Apr 17th, 2006, 7:04 AM   #20
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Not so broke that you can't afford a domain/hosting

Edit: And you're doing some truly creepy things on that page - reloading the window if netscape 4 resizes? Do you even know what Netscape 4?
Cerulean is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:24 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC