473,466 Members | 1,661 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Block website IP address

sumaiya
43 New Member
How can I block access to my websites from all IP addresses except one.

The application of this scenario is such that I have a website which should be accessible only from my office like a LAN application. But the website is hosted on the web thus this restriction.

I know .htaccess can do that but i tried using it cant make head and tails out of it. So would appreciate a lot if someone out there can help me.

Plus can anyone tell me where the feature is to activate an email from thescripts whn someone replies to my question. I checked the profile settings but no difference.

Thanks
May 26 '08 #1
3 1410
dlite922
1,584 Recognized Expert Top Contributor
How can I block access to my websites from all IP addresses except one.

The application of this scenario is such that I have a website which should be accessible only from my office like a LAN application. But the website is hosted on the web thus this restriction.

I know .htaccess can do that but i tried using it cant make head and tails out of it. So would appreciate a lot if someone out there can help me.

Plus can anyone tell me where the feature is to activate an email from thescripts whn someone replies to my question. I checked the profile settings but no difference.

Thanks

$_SERVER['REMOTE_ADDR']
May 26 '08 #2
dlite922
1,584 Recognized Expert Top Contributor

Plus can anyone tell me where the feature is to activate an email from thescripts whn someone replies to my question. I checked the profile settings but no difference.

Thanks

Click Options under settings in the main menu under the search field at the top right.
May 26 '08 #3
Atli
5,058 Recognized Expert Expert
Like the previous posts almost said ;)
You can get the IP of the visitor via the $_SERVER['REMOTE_ADDR'] element.

Then you can do whatever validation on it you may need and just exit the script if it does not pass your validation, thus preventing unauthorized access.
May 26 '08 #4

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

Similar topics

4
by: john Q | last post by:
I found a PHP based email obfuscator for use in websites, where the source HTML (PHP, actually) file doesn't contain the actual email address in the Mailto tag, but generates it and that...
18
by: Michal Mieszkowski | last post by:
i have a block of html code looking like this <FORM name=myform> <INPUT type=text name=firstname> <DIV id=mydiv> <INPUT type=text name=address> </DIV> </FORM> i can access firstname field...
8
by: B McDonald | last post by:
Hi. Someone, I'm sure, is going to laugh at me - but - is there an easier way to create the following block diagram? http://www.galtsvalley.com/on/rts.html (look at the sole figure on the page) ...
5
by: Chad | last post by:
I need to block a URL from printing at the bottom of the page from a website. Is there any code that can do that? I know I can make it into a PDF on the fly and that will elminate alot of hassle,...
6
by: Zenbug | last post by:
My website has a mail form run by PHP, and I'm getting a lot of e-mails sent through it that appear to contain my website's domain after the '@', though I didn't send them. The e-mails contain no...
2
by: TadPole | last post by:
Hi all, My main problems are::::::::: 1. Set a value within a block container that can be used and changed by subsequent templates/block-containers/tables etc.. 2. get/determine/find the...
12
by: Eric Lindsay | last post by:
I'm trying to learn how to read a DTD I wanted to use, http://www.w3.org/TR/html4/strict.dtd to ensure I was treating each element correctly in terms of being block, inline, or flow (either). ...
1
by: tankbattle | last post by:
That is, what's the difference between <complexType name="Address" final="restriction"> <sequence> <element name="name" type="string"/> <element name="street" type="string"/> <element...
3
by: Mintyman | last post by:
Hi, I have 2 fields in a database: 'email' and 'website'. In the majority of cases, the website field is not populated even though the email address is. In 90% of cases, the website will be...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.