Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   LWP::UserAgent post to post other than 80 (http://www.velocityreviews.com/forums/t894667-lwp-useragent-post-to-post-other-than-80-a.html)

Zapanaz 10-12-2005 06:33 AM

LWP::UserAgent post to post other than 80
 

What I am trying to do is post to a cgi script.

The way I am doing it is this:

my $ua = LWP::UserAgent->new();
my $response =
$ua->post("http://1.2.3.4:7775/cgi-local/fm_account.cgi");

where the IP address is a real one and not 1.2.3.4

I know the URL is valid, I can hit it in a web browser, when the code
runs though it hangs.

There are a lot of things that could be going wrong, but one thing I
am not sure of is if I can specify server:port like that with
UserAgent. Should that work? That is, if I am using http, is it
going to assume port 80, and fail to work correctly if it isn't?

Thanks for any help.



--
Zapanaz
International Satanic Conspiracy
Customer Support Specialist
http://joecosby.com/
The victim was pregnant by seeing her picture on a website
featuring her dogs for sale.


Gregory Toomey 10-12-2005 06:51 AM

Re: LWP::UserAgent post to post other than 80
 
Zapanaz <http://joecosby.com/code/mail.pl> wrote:

>
> What I am trying to do is post to a cgi script.
>
> The way I am doing it is this:
>
> my $ua = LWP::UserAgent->new();
> my $response =
> $ua->post("http://1.2.3.4:7775/cgi-local/fm_account.cgi");
>
> where the IP address is a real one and not 1.2.3.4
>
> I know the URL is valid, I can hit it in a web browser, when the code
> runs though it hangs.
>
> There are a lot of things that could be going wrong, but one thing I
> am not sure of is if I can specify server:port like that with
> UserAgent. Should that work? That is, if I am using http, is it
> going to assume port 80, and fail to work correctly if it isn't?
>
> Thanks for any help.


That should work. The problem could be with cookies, basic authentication,
or http_referrer.
For testing try wget with the URL.

gtoomey

Tad McClellan 10-12-2005 12:20 PM

Re: LWP::UserAgent post to post other than 80
 
Zapanaz <> wrote:

> I know the URL is valid, I can hit it in a web browser, when the code
> runs though it hangs.
>
> There are a lot of things that could be going wrong,



This may help to uncover some of those things:

Web Scraping Proxy

http://www.research.att.com/~hpk/wsp/


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

John Bokma 10-12-2005 04:14 PM

Re: LWP::UserAgent post to post other than 80
 
Tad McClellan <tadmc@augustmail.com> wrote:

> http://www.research.att.com/~hpk/wsp/


Thanks!

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
I ploink googlegroups.com :-)


Tad McClellan 10-12-2005 06:11 PM

Re: LWP::UserAgent post to post other than 80
 
John Bokma <john@castleamber.com> wrote:
> Tad McClellan <tadmc@augustmail.com> wrote:
>
>> http://www.research.att.com/~hpk/wsp/

>
> Thanks!



You're welcome.

I have dozens of web scrapers in use, I run the wsp often. :-)


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas


All times are GMT. The time now is 11:48 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.