Print Page | Close Window

I must Ban Certain Domains

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=20188
Printed Date: 28 March 2026 at 2:24am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: I must Ban Certain Domains
Posted By: hamsicik
Subject: I must Ban Certain Domains
Date 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




Replies:
Posted By: dpyers
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net