Gisle Aas wrote:

> Steve Borruso <[EMAIL PROTECTED]> writes:
>
> > Can't locate object method "epath" via package "URI::http"
> >  at /usr/local/lib/perl5/site_perl/5.005/HTTP/Cookies.pm
>
> Upgrading to LWP-5.49 or better should fix this problem.
>
> Regards,
> Gisle

I'm assuming my web hosting company will again balk at my request to
upgrade the level of LWP on my system (yes, I'm shopping for a new
service).

I tried Kingpin's suggestion (see script below). The form does get
submitted. I get an HTTP 200
reply but the page that's returned states "HTTP 400 Object not Found".
I've included the error page returned, my new script, and the inputs
defined on the form
below. I don't change anything on the form when it's retrieved or before
I submit it.

Any further assistance is appreciated.
Steve Borruso


HTTP/1.1 200 OK Date: Tue,
10 Apr 2001 01:23:31 GMT Server: Microsoft-IIS/5.0 Content-Type:
text/html Client-Date: Tue,
10 Apr 2001 01:27:28 GMT Client-Peer: 216.86.32.223:80

Error Occurred While Processing Request
 Error Diagnostic Information
 An error has occurred.
 HTTP/1.0 404 Object Not Found


Here's my latest script ....

use strict;
$|++;
use URI::URL;
use LWP::Simple ;
use HTML::TokeParser;
use LWP::UserAgent;
use HTTP::Cookies;
use HTTP::Request::Common;
use HTML::Form;
my $stripuserid= 'xxx';
my $CustCookieFile = "/mydir/BidVilleCookie.txt";
unlink($CustCookieFile);

my  $ua = LWP::UserAgent->new;
$ua->cookie_jar(HTTP::Cookies->new(file => "$CustCookieFile", autosave
=> 1));
my  $r = $ua->simple_request(POST "http://www.bidville.com/login.cfm",
                              {
                              # url => '',
                               nickname => 'xxx',
                               password => 'xxx',
                               return => 'http://www.bidville.com',
                              # 'Login!' => 'Login!',
                              });
while ($r->is_redirect) {
   my $u = $r->header('location') or die "missing location: ",
$r->as_string;
   print "redirecting to $u\n";
   $r = $ua->simple_request(GET $u);
}
my $bidville_logo_items = '23419620';
my $BV_Update_item =
'http://www.bidville.com/personal/edit_info.cfm?submit=Edit&itemnum=' .
$bidville_logo_items ;

my $res = $ua->request(HTTP::Request->new(GET => "$BV_Update_item"));

my $html = $res->content;

my $form = HTML::Form->parse($html,'http://www.bidville.com');

my $name = 'submit';

my $submit = $form->find_input($name);

my $req1 = $submit->click($form);
my $uri1 = new $HTTP::URI_CLASS($req1->uri);
$req1->uri($uri1);
my $r2  = $ua->simple_request($req1);
print $r2->as_string


Here's the inputs on the form being submitted....

POST http://www.bidville.com/edit_info.cfm
Content-Length: 2139
Content-Type:multipart/form-data;
boundary=000 --000
Content-Disposition: form-data; name="itemnum" 2364865 --000
Content-Disposition: form-data; name="login" xxxx --000
Content-Disposition:form-data; name="password" xxxx --000
Content-Disposition: form-data; name="title" NOT FOR SALE JUST TESTING 2
--000
Content-Disposition: form-data; name="banner_line" --000
Content-Disposition: form-data; name="Category1" 136 --000
Content-Disposition: form-data; name="CatMenu_0"
----------------------------------- --000
Content-Disposition: form-data; name="CatMenu_1"
----------------------------------- --000
Content-Disposition: form-data; name="CatMenu_2"
----------------------------------- --000
Content-Disposition:form-data; name="quantity" 1 --000
Content-Disposition: form-data; name="description" just testing 2 just
testing 2 --000
Content-Disposition: form-data; name="minimum_bid" 0.01 --000
Content-Disposition: form-data; name="reserve_bid" 0.25 --000
Content-Disposition: form-data; name="increment_valu" .2500 --000
Content-Disposition: form-data; name="take_it_price" --000
Content-Disposition: form-data; name="picture"
http://xxx.xxx.com/xxx.jpg --000
Content-Disposition: form-data; name="place1" 2 --000
Content-Disposition: form-data; name="sound" http:// --000
Content-Disposition: form-data; name="place2" 2 --000
Content-Disposition: form-data; name="gallery" 0 --000
Content-Disposition: form-data; name="already_in_gallery" 0 --000
Content-Disposition: form-data; name="counter" 1 --000
Content-Disposition: form-data; name="featured" 0 --000
Content-Disposition: form-data; name="auto_relist" 0 --000
Content-Disposition: form-data; name="date_end" 2001-04-16 16:01:00
--000
Content-Disposition: form-data; name="date_start" 2001-04-09 16:01:00
--000
Content-Disposition: form-data; name="duration" 7 --000
Content-Disposition: form-data; name="shipping" --000
Content-Disposition: form-data; name="payment" --000
Content-Disposition: form-data; name="submit" Add Item --000--

Reply via email to