hello friends
i am here to post how to block any website in your pc to block from ilegal acess
it is quite easy to use.
Follow the steps ...
Step1-open any cpp compiler
Step2- paste the following code into compiler
step4-compile it and run it
step 5-rum the .exe file as administrator
done......
any problem comment here...
bikash
i am here to post how to block any website in your pc to block from ilegal acess
it is quite easy to use.
Follow the steps ...
Step1-open any cpp compiler
Step2- paste the following code into compiler
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
char site[20],ch;
ifstream in;
ofstream out;
cout<<"Enter the Name of the Site to Block \n";
cin>>site;
out.open("C:/Windows/System32/drivers/etc/hosts",ios::app);
if(!out)
cout<<"Either File Not Found or Permission Denied, Run as Admin the EXE of the Program";
else
{
out<<"127.0.0.1"<<"\t"<<site;
cout<<site;
cout<<"is blocked";
}
out.close();
return 0;
}
step 3: save it as .cppstep4-compile it and run it
step 5-rum the .exe file as administrator
done......
any problem comment here...
bikash