Jump to content

Recommended Posts

Posted

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!

Posted

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
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

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
×
×
  • Create New...