Sign in to follow this  
Followers 0
Haseeb

how to prevent a site adress being entered in IE or Mozilla ?

4 posts in this topic

hi,

i want that if anyone will type in address input box like www.exampleweb.com then the script should redirect this web or dont allow the user to type it and give a message of restrictions found.

i dont want a too big code because i want to block many sites but dont want to increase memory of my program.

any help ???

thanx in advance!

Share this post


Link to post
Share on other sites



You can do this (rough)

#include <IE.au3>

Dim $BlockedSites[3]
$BlockedSites[0] = "www.yahoo.com"
$BlockedSites[1] = "www.google.com"
$BlockedSites[2] = "www.altavista.com"

$IE = _IECreate("www.autoitscript.com")
While 1
    For $Site in $BlockedSites
        If StringInStr(_IEPropertyGet($IE, "locationurl"),$Site) Then
            _IEAction($IE, "home")
        EndIf
    Next
WEnd

Share this post


Link to post
Share on other sites

Are you wanting this to work on a network or anything like that cos i'm currently working on a proxy server with a built in content filter?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I think he is trying to keep certain people out. A simple way to do it is edit the host file by making loopback addresses to the sites you want blocked. A second method is to use the security setting built into IE and Firefox. Firefox may require you to install a addon to do what you need.

More on HOST - http://www.accs-net.com/hosts/how_to_use_hosts.html

Edited by Volly

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0