Do you know where your variables are? | |
PerlMonks |
How to Detect HTTP proxy settings automatically in Windows OS?by sam_bakki (Pilgrim) |
on Apr 24, 2012 at 11:30 UTC ( [id://966800]=perlquestion: print w/replies, xml ) | Need Help?? |
sam_bakki has asked for the wisdom of the Perl Monks concerning the following question: Dear Perl Gurus,
I am writing a perl script to download files from internet using perl LWP , WWW::Mechanize modules. Currently I rely on HTTP_PROXY environment variable to understand the proxy. But it is pain to instruct the Windows users to set this variable and use my script.
I tried to use InternetGetProxyInfo API by using following code but looks like API itself is broken and suggestion is to use WinHttpGetProxyForUrl .
Question: Any one tried this API in perl already? If so can you please point me some code reference? Or is there any better way to detect HTTP proxy automatically?
Thanks & Regards,
Back to
Seekers of Perl Wisdom
|
|