need help on something, security question |
need help on something, security question |
Aug 16 2005, 11:54 AM
Post
#1
|
|
|
freakofakid43 ![]() Group: Member Posts: 5 Joined: Aug 2005 Member No: 204,803 |
i need a script where i can only let in people who i want in and keep others out without having to type the peoples names in
i have this script but it doesnt work all the time this is in the header temporarily <!-- begin code provided by createblog.com --> <script> // Private Blogging // By Paul Chen // --- Coyote // Put your list of (exact) names here. // Make sure they are all lowercase. // "join" = unregistered viewers // Go to end of the script and change // the custom alert message. var allowed = new Array( "", "", "", "", "" ) var links = document.getElementsByTagName('a'); name=""; for(i=0;i<links.length;i++) { if(links[i].innerText.match(/xanga/i) && links[i+2].innerText.match(/sign out/i)){ i++; if(links[i].href.match('/private/home.aspx') || links[i].innerText.match('join')){ name = links[i].innerText.toLowerCase(); break; } } } enter=false; for(j=0;j<allowed.length;j++) { users = allowed[j]; if(users.indexOf(name)==0 && users.length==name.length){ enter=true; break; } } if(enter!=true){ alert('Sorry, this is a private blog! if you would want permission to see my site email freakofakid43@gmail.com'); //change the message history.go(-1); } </script> <!-- end code provided by createblog.com --> and this is in the webstats <!-- begin code provided by createblog.com --> <script> // Private Blogging // By Paul Chen // --- Coyote // Put your list of (exact) names here. // Make sure they are all lowercase. // "join" = unregistered viewers // Go to end of the script and change // the custom alert message. var allowed = new Array( "", "", "", "", "" ) var links = document.getElementsByTagName('a'); name=""; for(i=0;i<links.length;i++) { if(links[i].innerText.match(/xanga/i) && links[i+2].innerText.match(/sign out/i)){ i++; if(links[i].href.match('/private/home.aspx') || links[i].innerText.match('join')){ name = links[i].innerText.toLowerCase(); break; } } } enter=false; for(j=0;j<allowed.length;j++) { users = allowed[j]; if(users.indexOf(name)==0 && users.length==name.length){ enter=true; break; } } if(enter!=true){ alert('Sorry, this is a private blog! if you would want permission to see my site email freakofakid43@gmail.com'); //change the message history.go(-1); } </script> <!-- end code provided by createblog.com --> if anyone can help.. it would be gratefull |
|
|
|
![]() |
Aug 17 2005, 01:41 PM
Post
#2
|
|
![]() :hammer: ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 9,849 Joined: Mar 2004 Member No: 7,700 |
|
|
|
|
![]() ![]() |