CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Posting problem


New User

Mar 29, 2011, 4:21 AM

Post #1 of 1 (1243 views)
Posting problem Can't Post


firstly sorry for my english ; >

so i try to post comment on wordpress cms...

use LWP::UserAgent; 

$ua = LWP::UserAgent->new(timeout => 5);

$post{$author} = "asssda";
$post{$email} = "";
$post{$url} = "";
$post{$comment} = "sss sss sss";
$post{$comment_post_ID} = 12833;
$post{$submit} = "Dodaj komentarz";

#this is example site where it does not work
$form = "";

$response = $ua->post($form, \%post);
print $response->as_string;

response is 200 but should be 302 and server should send cookie with author name, email, url... I was try with different headers, different post data (...) I spent few hours trying to solve this problem and results: NOTHING! : / On some servers this code works great...

(This post was edited by emerror on Mar 29, 2011, 4:25 AM)


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives