Block access to specific URL addresses
General and Desktop
4
Posts
2
Posters
1.3k
Views
1
Watching
-
Hi, welcome to devnet.
Block where? In your app? In some browser? On your system? On the network? The answer can only be as specific as the question.
Btw It's Qt, QT is usually Apple QuickTime.
-
Which system? :)
This is not really a Qt question. Usually it's a task of a firewall.
On some systems you might also insert something like
@127.0.0.1 site.to.block.com @ or
@1.2.3.4 localhost #where 1.2.3.4 is the ip of the site to block @
in the "hosts file":http://en.wikipedia.org/wiki/Hosts_(file) to loop-back any requests for that site and effectively block it.
For editing this file with Qt you can use QFile, but be aware that your app will need administrative rights to do that.