LWP vs Netscape

1999-12-03 Thread raptor

hi,

If I put this on Location: bar on the Netscape browser, I get the result
of the search as expected (try it).
http://www.volunteermatch.com/results/results.jtmpl?zip=5radius=60when=30ongoing=bcategory=Everythingsubmit=Search



But If I try to do this via LWP package, I didn't get the result page,
but the FORM that is used to create this query(something is going
wrong). Why ?!?!? What also is nesecary to send to the Web server, some
Headers or what ?? Which ?
I even got this result if I try the same query via telnet ?

#!/usr/bin/perl
use LWP::UserAgent;
my $UA = new LWP::UserAgent;
#$UA-agent("Agent/007:)");

my $req = HTTP::Request-new(GET =
'http://www.volunteermatch.com/results/results.jtmpl?zip=5radius=60when=30ongoing=bcategory=Everythingsubmit=Search'
);
my $result = $UA-request($req);
print $req-as_string;
 if ($result-is_success)
  {
   $bb = $result-content . "BR\n";
   $bb =~ s/^.*body bg(.*)\/body.*$/$1/is;
   print $bb;
  }
   else {print "no success\n";}




THANX
=
iVAN
[EMAIL PROTECTED]
=



RE: LWP vs Netscape

1999-12-03 Thread Eric Cholet

 hi,
 
 If I put this on Location: bar on the Netscape browser, I get the result
 of the search as expected (try it).
 
http://www.volunteermatch.com/results/results.jtmpl?zip=5radius=60when=30ongoing=bcategory=Everythingsubmit=Search

I don't, I get the search form. Using IE5 on Win98.

 
 
 But If I try to do this via LWP package, I didn't get the result page,
 but the FORM that is used to create this query(something is going
 wrong). Why ?!?!? What also is nesecary to send to the Web server, some
 Headers or what ?? Which ?
 I even got this result if I try the same query via telnet ?
 
 #!/usr/bin/perl
 use LWP::UserAgent;
 my $UA = new LWP::UserAgent;
 #$UA-agent("Agent/007:)");
 
 my $req = HTTP::Request-new(GET =
 
'http://www.volunteermatch.com/results/results.jtmpl?zip=5radius=60when=30ongoing=bcategory=Everythingsubmit=Search'
 );
 my $result = $UA-request($req);
 print $req-as_string;
  if ($result-is_success)
   {
$bb = $result-content . "BR\n";
$bb =~ s/^.*body bg(.*)\/body.*$/$1/is;
print $bb;
   }
else {print "no success\n";}
 
 
 
 
 THANX
 =
 iVAN
 [EMAIL PROTECTED]
 =
 




LWP vs Netscape

1999-12-03 Thread Robert Locke


When I went to:

http://www.volunteermatch.com/results/results.jtmpl?zip=5radius=60when=30ongoing=bcategory=Everythingsubmit=Search

using Netscape, it showed me the search form the first time round.

After I actually ran the search, then even going to:
http://www.volunteermatch.com/results/results.jtmpl

(without the extra cruft) would always show me the actual search
results - not the form.

Anyways, I think the problem has to do with cookies.  Turn "cookie
warnings" on and you'll see that it sets session cookies which it must
use to remember your last search.

Another way to see this is if you turn cookies off, the
"results.jtmpl" URL will always show you the search form.  (You must
re-start Netscape first to remove the session cookie.)

To make a long story short, my advice would be to use POST and not
GET.  I think that might work.

Good luck!

Rob



Re: LWP vs Netscape

1999-12-03 Thread G.W. Haywood

On Fri, 3 Dec 1999, Robert Locke wrote:

 To make a long story short, my advice would be to use POST and not
 GET.  I think that might work.

Then you get something in access_log too.

73
Ged.