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: Edit Log

New User

Mar 29, 2011, 4:21 AM

Views: 1411
Posting problem


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)

Edit Log:
Post edited by emerror (New User) on Mar 29, 2011, 4:22 AM
Post edited by emerror (New User) 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