proxy help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ajay600
Forum Newbie
Posts: 14
Joined: Tue Jan 19, 2010 8:54 am

proxy help

Post by ajay600 »

my college internet requires us to set proxyHost to " 172.16.1.3 " and proxy port to " 3128 " and then when we restart the browser i will be asked to enter a user name and password to connect to the internet ..user name is "2006it088" and pass is "shivram" .

my project requires me to give the input as a web page and then after a few operations display it ..because of the proxy settingsin my college i am not able to display the output ..

my friend gave me a java code that does the proxy settings and enters username & pass automatically ..it works for his project which is in JAVA

//Properties systemSettings = System.getProperties();
//systemSettings.put("proxySet", "true");
// systemSettings.put("http.proxyHost", "172.16.1.3");
// systemSettings.put("http.proxyPort", "3128");
//sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder();
// String encodedUserPwd = encoder.encode("2006it088:shivram".getBytes());
// con.setRequestProperty("Proxy-Authorization", "Basic " + encodedUserPwd);
//con.setRequestMethod("HEAD");

i need a php code to do the proxy settings automatically and then enter the username and password automatically so that the output can be displayed
..please help
Post Reply