Solved

Using Win32::Internet to access sites outside of a firewall

Posted on 1997-07-21
3
251 Views
Last Modified: 2008-02-26
I'm using Win32::Internet to write a search engine that retrieves information on different sites.  The problem I'm having is that I'm behind a firewall and I don't know how to get around it.  I can get through using FTP requests, but I can't read files that way.  I want to be able to go to another site, read a file and compare the contents in that file to the search criteria entered. I've tried doing that via ftp, but I have to download the file first.  Is there any other way I can do it?
0
Comment
Question by:mclennan
3 Comments
 
LVL 5

Expert Comment

by:icd
ID: 1204977
What are these documents you want to retrieve, are they html documents? If so then if a browser can access them then so should a perl script.

I wrote a Win32:Internet program to read html documents that I could find for you, if that is what you need.


0
 

Author Comment

by:mclennan
ID: 1204978
That's about what I need.  Does it read multiple files in multiple directories or does it only read the files you specify?
0
 
LVL 2

Accepted Solution

by:
dmethvin earned 100 total points
ID: 1204979
Most likely the firewall is blocking access through port 80, the one used by default for HTTP (web) access. If the firewall has an HTTP proxy set up, you could get to the outside Internet through the proxy.  You set that up in the Internet applet of Control Panel.

I haven't used the Internet APIs through a proxy, but it appears to be possible according to the docs. In Win32::InternetOpen, set dwAccessType to INTERNET_OPEN_TYPE_PROXY. There's a proxy name that you can pass in as well through lpszProxyName, or leave it empty and it should use the control panel info. If you don't have the docs handy, take a look <A HREF="http://www.graphcomp.com/info/specs/ms/inetr002.htm#wininet_0001000103000c00">http://www.graphcomp.com/info/specs/ms/inetr002.htm#wininet_0001000103000c00</A> for them.

If what you're trying to do is get around the firewall despite the lack of an HTTP proxy, then just about any solution you use will compromise the security of your local network. You should discuss any solution like that with the local network administrators.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question