Forum Moderators: phranque

Message Too Old, No Replies

IP Question - Not Blocking but more fun!

A bothersome IP and my idea

         

digitalgirl

12:17 pm on Jun 28, 2001 (gmt 0)



Hi,

it's me again! I have a silly question, but would love it if it worked.

I do not want to block this person as I think she tends to take herself to seriously afterwards. What I would like is to be able to somehow have something prompting her on the screen everytime she comes to the site which is 10 times a day :) Something like "Source traced and logged"- yup evil I know :)

Is that possible?

DGirl

oilman

3:24 pm on Jun 28, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It would be entirely possible to redirect her 'ip ala cloaking' and send here to a page that says "Welcome back IP aaa.bbb.ccc.ddd this is your X visit of the day. I hope you are finding everything you need :)". Then redirect here back to the home page.

It would take a little creative perl coding and possibly even cookies but it would be wild to see the look on her face :)

digitalgirl

6:09 pm on Jun 28, 2001 (gmt 0)



Oh oh oh, I want to learn how to do this! Please please what do I have to do for some help?? Humm, perhaps I should not be so eager :)

You know I catch on fast, will you tell me what to do?

theperlyking

6:23 pm on Jun 28, 2001 (gmt 0)

10+ Year Member



Does your server support SSI (server side includes)?

If so you can put this in the pages


<!--#if expr="$REMOTE_ADDR=192.168.0.12" -->
<h2>Source traced and logged</h2>
You are not allowed to access this site, your connection details have been logged.
<!--#endif -->

replace 192.168.0.12 with her ip and only she will see whatever message you put there.

msgraph

6:39 pm on Jun 28, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are familiar to PHP and have it running on your server you can do all kinds of cool tricks.

php.net/tut.php

Here is one site that has a cool setup: www.thematrix.com

rcjordan

7:01 pm on Jun 28, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd use this (or a variation) js. Block entrance depending on IP address script [wsabstract.com]

digitalgirl

8:21 pm on Jun 28, 2001 (gmt 0)



Well-

IP Based Cloaking? Any hints on that one?

I had her blocked already, so she changed services, I still can block her, but this makes her feel that she is SO important + makes her check my site 20-50 times a day from somewhere else-

I just wanna poke fun at her with some pop up (java like) script. Now I cannot have my customers involved in this thus do not want to add anything in my code-

What ya all think?

DGirl ;)

theperlyking

10:16 pm on Jun 28, 2001 (gmt 0)

10+ Year Member



Javascript (rcjordans link does what you have asked - pops up a message) would have to be in your HTML as much as any of the other things listed on your page so I don't quite follow.

You can't really achieve what you are asking any other way :)

digitalgirl

3:09 am on Jun 29, 2001 (gmt 0)



I can block people by entering their ip address to my htaccess, nothing on the html code at all :)

I think I have to look in to what Oilman was talking about-one more thing to learn! Clocking is a mystery to me, so that is what I was asking about.

Gorufu

7:37 am on Jun 29, 2001 (gmt 0)

10+ Year Member



You can easily redirect IP's to another directory using .htaccess A 403 forbidden access error occurs for blocked IP's so if you add

ErrorDocument 403 /goodbye/index.html

to .htaccess all denied IP's will be directed to /goodbye/index.html

Create a directory goodbye and add .htaccess to that directory with the following lines.

deny from all
allow from 222.222.222.222

All IP's will be blocked and still return a 403 error, except for the IP 222.222.222.222, in this example.

Create a webpage in goodbye directory and put what ever message you like there. Now if you want to be really nasty add to the webpage

<META HTTP-EQUIV="refresh" CONTENT="5; URL=http://222.222.222.222">

She will have 5 seconds to read your message before being redirected to her own IP address.

theperlyking

7:43 am on Jun 29, 2001 (gmt 0)

10+ Year Member



Ah that looks good and answers a question i've wondered too - how to use a custom 403 error doc for someone who is forbidden.

Ta :)

digitalgirl

4:37 pm on Jun 29, 2001 (gmt 0)



Gorufu-

:) Thank ya! *evil grin* I love the redirect thing. Thanks so much again!

DGirl

digitalgirl

1:20 pm on Jun 30, 2001 (gmt 0)



Does the <META HTTP-EQUIV="refresh" CONTENT="5; URL=http://222.222.222.222"> go between <head> </head> or can it be anywhere?

Thanks :)

Gorufu

11:53 pm on Jun 30, 2001 (gmt 0)

10+ Year Member



go between <head> </head> or can it be anywhere?

It goes between the head tags and the redirect can be to any URL.

digitalgirl

5:22 am on Jul 1, 2001 (gmt 0)



That's what I had done, so great ;) Thank you!

digitalgirl

8:46 pm on Jul 27, 2001 (gmt 0)



I have another question. If my directory does not have a htdocs folder will the htaccess work? I do not think it will because the blocked ips are squeezing in now that I have moved my site to a new host. This host does not have a htdocs folder under my main directory.

Can you help?? Again :-) Thank ya all

DG

Gorufu

7:08 am on Jul 28, 2001 (gmt 0)

10+ Year Member



> If my directory does not have a htdocs folder will the htaccess work?

.htaccess should work in any directory. There are two reasons why it may not work with your new hosting company.

1) If your site is hosted on a Microsoft/IIS server .htaccess will not work.

2) On an Apache web server, the hosting company has configured it to not allow the use of .htaccess

digitalgirl

3:18 pm on Jul 28, 2001 (gmt 0)



So what do you suggest I should do? Is there any other way of doing this??

Thanks :-)

john316

4:13 pm on Jul 28, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm coming into this from a new angle. It appears that this girl you are trying to ban or play games with or whatever, has been totally successful in doing what she set out to do: mess with you. I would strongly suggest that unless you can somehow profit from the cat and mouse game, that you simply ignore her. Apparently she is craving the attention and time that you lavish on her, if you stop, she will go away.

You sound like like a bright person, spend your resources in a more sane fashion.

digitalgirl

8:28 pm on Jul 28, 2001 (gmt 0)



I know what you are saying, but it is still very hard. If I come up with a product, she does the same thing in 3 days! I just want to make things slightly hard on her. I guess I have to take your advice.

Women ~ deadly creatures! :(

commander

10:48 pm on Aug 23, 2001 (gmt 0)



dg,
I needed a script like this too to redirect based on the users IP. I had to do this on my schools server and they dont allow cgi, or ssi. But if your server supports active server pages, let me know and i will email you the script i came up with.

commander
go navy