473,378 Members | 1,364 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Blocking/Allowing by IP in ASP?

Hi,
i need to know how to write a page in either JS, ASP etc.. page(s) that does the following.

1) Checks the ‘referrer’ page, where that person clicked on the link from.

2) If they clicked, typed in the URL, or got to the page from anywhere but http://client.internal.network/webca...h/default.html , they should be re-directed to a page that says “sorry, please access this event from http:// ….

3) If they clicked on the link from the correct page (http://client.internal.network/webca.../default.html), they should be re-directed to the registration page à http://example.url.com/view/wl/r.htm?

4) The client is concerned that people will just by-pass this ‘check’ page by having one person access the event from the appropriate location (http://client.internal.network/webca.../default.html), gain access to the event, and then simply copy and paste the registration page URL from the Address bar, or view source on the registration page, and email the actual event link to a friend, thus bypassing this whole page we’re creating. I would guess that if they come from the correct page (http://client.internal.network/webca.../default.html), the re-direct can be a JS pop-up (970x680), thus hiding the address bar.
Nov 6 '06 #1
1 1500
sashi
1,754 Expert 1GB
Hi,
i need to know how to write a page in either JS, ASP etc.. page(s) that does the following.

1) Checks the ‘referrer’ page, where that person clicked on the link from.

2) If they clicked, typed in the URL, or got to the page from anywhere but http://client.internal.network/webca...h/default.html , they should be re-directed to a page that says “sorry, please access this event from http:// ….

3) If they clicked on the link from the correct page (http://client.internal.network/webca.../default.html), they should be re-directed to the registration page à http://example.url.com/view/wl/r.htm?

4) The client is concerned that people will just by-pass this ‘check’ page by having one person access the event from the appropriate location (http://client.internal.network/webca.../default.html), gain access to the event, and then simply copy and paste the registration page URL from the Address bar, or view source on the registration page, and email the actual event link to a friend, thus bypassing this whole page we’re creating. I would guess that if they come from the correct page (http://client.internal.network/webca.../default.html), the re-direct can be a JS pop-up (970x680), thus hiding the address bar.
Hi there,

Kindly refer to below code segment, hope it helps. Good luck & take care.

Expand|Select|Wrap|Line Numbers
  1. <% 
  2. Dim sBlockedIP
  3. sBlockedIP = Request.ServerVariables("REMOTE_ADDR") 
  4. 'check if the IP is the one that is blocked
  5. If sBlockedIP = "1.2.3.4" Then 
  6. 'if IP address is banned then redirect to no_access.asp
  7. Response.Redirect "no_access.asp"
  8. End If 
  9. %> 
  10.  
Nov 7 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Hal | last post by:
I am experiencing blocking problems on SQL Server 2000, SP3a. I have read the posts and set up a job SQL agent to report on these occurences I save the results to a table before executing an sp to...
4
by: la_haine | last post by:
I have a collection of pages that are designed to be called into an iframe (named displayView), and the managers don't want people to be able to view them unless they're in that iframe. If I use...
3
by: David Sworder | last post by:
This message was already cross-posted to C# and ADO.NET, but I forgot to post to this "general" group... sorry about that. It just occured to me after my first post that the "general" group readers...
3
by: Mario | last post by:
Hello, I couldn't find a solution to the following problem (tried google and dejanews), maybe I'm using the wrong keywords? Is there a way to open a file (a linux fifo pipe actually) in...
38
by: Emmett | last post by:
I have a simple jacascript that randomizes the background of the top frame of my webpage http://www.duke.edu/~efn. For some reason, my Internet Explorer started blocking the background and...
7
by: David Sworder | last post by:
Hi, I'm developing an application that will support several thousand simultaneous connections on the server-side. I'm trying to maximize throughput. The client (WinForms) and server communicate...
7
by: Michi Henning | last post by:
Hi, I'm using a non-blocking connect to connect to a server. Works fine -- the server gets and accepts the connection. However, once the connection is established, I cannot retrieve either the...
3
by: loosecannon_1 | last post by:
I get a 90-120 second blocking when send 15 or so simultaneous queries to SQL Server 2000 that query a view made up of two joined tables. After each query is blocking for the same amount of time...
1
by: opi | last post by:
My blocking TCP server hangs in the Accept method when the client software sometimes gets an error. Are there any ways to stop this blocking in the Accept method so I dont have to restart the...
12
by: puzzlecracker | last post by:
is it even possible or/and there is a better alternative to accept input in a nonblocking manner?
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.