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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Posting problem

 



emerror
New User

Mar 29, 2011, 4:21 AM

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

hi...

firstly sorry for my english ; >

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


Code
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)

 
 


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

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