Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - I must Ban Certain Domains
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

I must Ban Certain Domains

 Post Reply Post Reply
Author
hamsicik View Drop Down
Newbie
Newbie
Avatar

Joined: 16 October 2003
Location: Turkey
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote hamsicik Quote  Post ReplyReply Direct Link To This Post Topic: I must Ban Certain Domains
    Posted: 06 June 2006 at 9:12am

Hi From Turkey,

 

I have a toplist and I want to prevent certain websites that I recorded previously in database. I recorded only domain names( ie: hotmail.com), and want to catch the registrations which contains this domains. For example in registration form user entered www.hotmail.com  http://www.hotmail.com or http://www.hotmail.com/index.asp, I must prevent this registration using the record “hotmail.com”

 

But the codes below is incorrect. Please modify the SQL line in order to prevent this sites. Please help me.

 

Thanks in advance

 

Ali Goksel

 

Kayitformu.asp:

 

<html>

<head>
<title>Form</title>
</head>

<body>

<form method="get" action="verify.asp">
site name
<input type="text" name="URL" size="20" value="http://">
<input type="submit" value="Save" name="cmd">
</form>

</body>

</html>

 

Verify.asp:

 

<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("yasak.mdb")

URL = request.querystring("URL")

set objRS = Server.CreateObject("ADODB.Recordset")
sql = "select * from tblBanUrl where Banurl like  '%" & URL & "%' "
objRS.open sql,conn,1,3

if objRS.eof then
response.write "Nothing found. So this site is not banned"
response.end
else
do while not objRS.eof
response.write "Banned Site Name:"
response.write "<br>"
response.write objRS("banurl")
objRS.movenext
loop
end if
%>

 

Database:

 

Database name: yasak.mdb

Table Name:     tblBanurl

Field Name:       Banurl

Records:        hotmail.com, msn.org, microsoft.com

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 06 June 2006 at 8:53pm
Check your forum admin page - "Email Address Banning" should do what you want.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.