$HeadHunter_Sid wrote:
> Hello, $Bill Luebkert, Zac Morris, Martin Moss and
> other
>
> Thank you for respond, but:
>
> 1. I use Win32 and ParallelUserAgent is for Linux and
> Sun not for Win32 OS
Actually I have a script that uses LWP::Parallel::UserAgent
on Win32 for checking my website links, so I guess that's
not really true. Near as I can tell it works fine on Win32.
> 2. ThreadPool is not for me - it is bad choice (I
> don't know Perl as you $Bill, but I expect another
> decision for this problem.)
It's the only thread module I've played with. Works good
for testing file system stuff - I tested multiple lock users
with it. It does create a new process for each test.
> In perldoc on page
> \Perl\html\site\lib\LWP\UserAgent.html is write:
>
> $ua->request($request, $arg [, $size])
>
> Process a request, including redirects and security.
> --> This method may actually send several different
> simple requests. <--
> The arguments are the same as for simple_request().
>
> That is what I want, but nowhere is write example how
> to do that. Anyone have an idea?
That will handle a set of serial requests to normally the same site.
Basically it is not in parallel.
> In my program I have @massiv with many saits, I want
> cicle, and in every cicle I have 10 request, when one
> die another to change it for the end of @massiv
>
> For example:
>
> @massiv=qw/ sait1 sait2 .... saitN/;
>
>
> sub something {
> $ua = LWP::UserAgent->new;
> $ua->agent("$0/0.1 " . $ua->agent);
> $req = HTTP::Request->new(GET => "$one_sait"); # but
> not $one_sait, many saits (10 or 20 or ..)
> # How to do that?
> }
>
> I have seen many programs do that written in C or C++,
> but I know only Perl and PHP for pity in this moment.
LWP::Parallel::UserAgent will do what you need on Win32. I think
you have to get it from CPAN rather than AS site though. I think
I started with this script from Randal's site:
http://www.stonehenge.com/merlyn/WebTechniques/col27.listing.txt
col14 and col35 also use UserAgent, but not Parallel.
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs