
emerror
New User
Mar 29, 2011, 4:21 AM
Post #1 of 1
(904 views)
|
|
Posting problem
|
Can't Post
|
|
hi... 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} = "asssad@wp.al"; $post{$url} = "http://saassd.pl"; $post{$comment} = "sss sss sss"; $post{$comment_post_ID} = 12833; $post{$submit} = "Dodaj komentarz"; #this is example site where it does not work $form = "http://cgk.czestochowa.pl/wp-comments-post.php"; $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)
|