Re: Win32::Internet fetch url question
- From: "J. Gleixner" <glex_no-spam@xxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 10 Nov 2006 14:59:11 -0600
EL34 wrote:
Please stop top-posting....
J. Gleixner wrote:EL34 wrote:
[...]
I am using fetch to open the file.Next time, show the code that creates $INET.
Is there a way toMaybe you should look through the documentation for Win32::Internet,
see if a files exist on a server or if,
if the internet connection is down or,
any sort of reason why Perl cannot fetch the file within say 10
seconds?
I looked over the win32::internet docs but I don't quite understand how
to go about doing this.
a short example would be much appreciated.
instead. :-)
I've never used it, however I took a few seconds and searched the
documentation for 'timeout', and found a 'ConnectTimeout' method. That
should provide you with a solution.
> EL34 wrote:
>> Thanks, but that one line does it all, there is no other code exept
>> Use::win32::internet.
Well, there's your problem.
>>
>> I was kind of looking for someone who was familiar with the module and
>> an example, as I stated above.
It seems to be clearly spelled out in the documentation, I don't
need to be familiar with the particular module, if it's well
documented.
>> Please don't get Po'd but your answer was of no help.
Why would I be "Po'd" that I point you right to the method you
need to resolve your stated issue and you say I was no help?
> Use::win32::internet.
use Win32::Internet;
See, this stuff is important. If that's wrong then the one
line from you're script doesn't help anyone figure out
the problem.
> $INET = new Win32::Internet();
> $INET->FetchURL("$FileOnServer");
>
> Actually, here's all that's required to fetch an URL.
> Anyone have a simple working example of using the http session seesion
> code and a way to test if the page can be fetched?
> I'm not sure what I am looking at in the doc's as I stated above.
So you looked at the documentation and found ConnectionTimeout and that didn't help disconnect the connection after a certain amount of time waiting? I don't see that in your code.
You could also look at the test code that comes with that module,
which I found conveniently located on CPAN.
http://search.cpan.org/src/JDB/libwin32-0.26/Internet/test.pl
The "GENERIC URL FETCHER" part...
It's amazing the helpful things you find in the documentation.. :-)
Now, if you come back for more, after that, and top-post your 3-line script saying "It didn't work", then I'll get "Po'd".
Thank You
.
- Follow-Ups:
- Re: Win32::Internet fetch url question
- From: J. Gleixner
- Re: Win32::Internet fetch url question
- References:
- Win32::Internet fetch url question
- From: EL34
- Re: Win32::Internet fetch url question
- From: J. Gleixner
- Re: Win32::Internet fetch url question
- From: EL34
- Re: Win32::Internet fetch url question
- From: EL34
- Win32::Internet fetch url question
- Prev by Date: Re: Sharing variables between modules
- Next by Date: Re: Win32::Internet fetch url question
- Previous by thread: Re: Win32::Internet fetch url question
- Next by thread: Re: Win32::Internet fetch url question
- Index(es):
Relevant Pages
|