Jump to content

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


Recommended Posts

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!

Link to comment
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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...