Hello Perl monks,
This is a repeat question... so please don't get annoyed for asking it again. I didn't understand the replies in the first thread ...so I am brining up the question again.
I connect to the internet via a proxy server. the proxy server is NOT NTLM ... I am sure because I am able to browse the web thru mozilla. if it was NTLM then only IE will work. My proxy server is also not SOCKS.
I suppose it is just a plain proxy server which needs loginid and password before it forwards the request out of our network.
I have searched many times google and this site ... but I cannot find how can I do this in perl.
In my search I was able to find a C# program which did the very same thing which I want. Please let me know how can I do the same thing in perl
thanks.using System; using System.IO; using System.Net; public class TestNet { public static void Main(string[] args) { string url = "http://www.perlmonks.com"; HttpWebRequest req = (HttpWebRequest) WebRequest.Create(url); + WebProxy proxy = new WebProxy("proxy.server.intranet:8080"); proxy.Credentials = new NetworkCredential("user", "password"); req.Proxy = proxy; HttpWebResponse resp = (HttpWebResponse) req.GetResponse(); + StreamReader reader = new StreamReader(resp.GetResponseStream()); + while(reader.Peek() > -1) { Console.WriteLine(reader.ReadLine()); } reader.Close(); resp.Close(); } }
In reply to authenticate to a proxy server [Again!] by abhishes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |