HTTP POST 
Author Message
 HTTP POST

Hello,

I'm using LWP to post to search engines and directories with perl, but
it seems my script doesn't post correctly to major search engines like
altavista.com.  Here's my code to post to altavista:

$| = 1;

require LWP::Protocol::http;
require LWP::UserAgent;
$ua = new LWP::UserAgent;

$url = " http://www.*-*-*.com/ ;;
$form="ads=1&q= http://www.*-*-*.com/ ;;

 $request = new HTTP::Request('POST', $url, undef, $form);
 $request->header('Content-type','application/x-www-form-urlencoded');

 $response = $ua->request($request, undef, undef);
 $str = $response->as_string;

print $str;

I keep getting the url you submitted (and it displays nothing) was
invalid.  I know the above name=value pairs are correct because I
pulled them off of altavista's submission form.

What am I doing wrong?


Thanks



Tue, 10 Apr 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Issuing an HTTP POST from within perl?

2. Secure HTTP post with user authorization (htaccess)??

3. Receiving http post in perl.

4. HTTP Posting

5. http post-method

6. How to Redirect a HTTP POST request ???????

7. LWP::UserAgent HTTP POST authentication problem

8. HTTP POST & authorization

9. perl-module for HTTP POST

10. Problem using Perl script to do a http POST request

11. HTTP POST HELP using LWP

12. HTTP post with basic auth and contents named by a parameter

 

 
Powered by phpBB® Forum Software