Hmmm
Looking at _trivial_http_get:
if ($code =~ /^30[1237]/ && $buf =~ /\012Location:\s*(\S+)/) {
# redirect
So it certainly seems like it's *trying to handle it.
As I recall (it was a late night when I had an application that wasn't
working), I had single stepped down into
Steve Reppucci <[EMAIL PROTECTED]> writes:
> Just a word of warning: LWP::Simple doesn't follow redirects (at least,
> the last I checked, not sure if it's been changed in the 3 or 4
> months since I've last used it...),
If it does not follow redirects then that is a bug. Do you have a
test cas
On Mon, 28 Aug 2000, Jeff Beard wrote:
> I just wrote a function yesterday that uses IO::Socket to interact with an
> outside CGI program. It appears to work the way I want but this is my first
> foray into writing TCP client code.
>
> It's basically this:
>
> sub tcp_client {
> my ( $rh
I just wrote a function yesterday that uses IO::Socket to interact with an
outside CGI program. It appears to work the way I want but this is my first
foray into writing TCP client code.
It's basically this:
sub tcp_client {
my ( $rhost, $rport, $query_string ) = @_;
my $socket = IO
On Mon, 28 Aug 2000, Steve Reppucci wrote:
>
> Just a word of warning: LWP::Simple doesn't follow redirects (at least,
> the last I checked, not sure if it's been changed in the 3 or 4
> months since I've last used it...), so you need to be certain that you're
> using it in a context where you'r
Just a word of warning: LWP::Simple doesn't follow redirects (at least,
the last I checked, not sure if it's been changed in the 3 or 4
months since I've last used it...), so you need to be certain that you're
using it in a context where you're fetching something that won't return a
redirect.
HT
lt;[EMAIL PROTECTED]>; "mod_perl Maillinglist" <[EMAIL PROTECTED]>
Sent: Saturday, August 26, 2000 10:24 AM
Subject: Re: Getting data from external URL
> SB> This one is much more efficient and requires even less coding:
> SB> use LWP::Simple;
> SB> $content = get("http://www.sn.no/")
>
> Even better, thanks Stas.
>
>
>
SB> This one is much more efficient and requires even less coding:
SB> use LWP::Simple;
SB> $content = get("http://www.sn.no/")
Even better, thanks Stas.
On Sat, 26 Aug 2000, Rodney Broom wrote:
> OK, lots of banter...
>
> Hey V, if you are on a *NIX system, then this is a fast way:
>
> open U, "lynx -source www.some.url.dom |";
> $data = join '', ;
>
> There, you're finished. Admittedly, this isn't terribly efficiant, but it works
> just fine
OK, lots of banter...
Hey V, if you are on a *NIX system, then this is a fast way:
open U, "lynx -source www.some.url.dom |";
$data = join '', ;
There, you're finished. Admittedly, this isn't terribly efficiant, but it works
just fine and has short devel time.
Rodney Broom
Hello Vijay,
You can make simple HTTP GET or POST requests
using the LWP and HTTP modules. I recommend
that you read the ActivePerl help files.
I have attached the one you really need but
it probably won't make sense unless you read
up on LWP.
# A small sample follows:
use LWP::UserAgent;
# us
Hello,
>
> I want to get data from an external url in my perl program (either thru
> Embperl Execute or directly from perl). What I need is like this.
>
> There is a URL which gives some information in text format. I want to get
> that into a variable or file using perl and using my own html temp
Apache::Request simply maps the Apache object into an Apache::Request
object (I know that sounds like double-speak, but it's late), and adds
some extra methods. I don't think that's what Vijay's original
question is all about.
What's needed is an HTTP::Request object. Look at LWP::UserAgent
If you're in a modperl enviroment, and don't use CGI.pm, try using
Apache::Request (I'm not a fan of using Apache.pm for too much). Has
anyone ever considered making a wrapper for all the modules which get
back data from the request (roll Apache::Request, Apache::Cookie, etc,
into one)? Seems tr
14 matches
Mail list logo