Block access to specific URL addresses
I want to block access to specific URL addresses. Is there any way to do it in QT?
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.
I want to block in the system. Please give me a solution.
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
@22.214.171.124 localhost #where 126.96.36.199 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.