hi,
ich want to perform an automatic post in a vB forum with php.
my idew was to solve this problem with the function http_post_fields(), but my problem is atm, that i can't login to the forum.
If i try to post a message, my result is the vB login page.
I tryed to login with cookies, like in the example at php.net, but it didn't work with vB.
Anyone have a idee?
heres my code:
btw, sry for my bad english xD
ich want to perform an automatic post in a vB forum with php.
my idew was to solve this problem with the function http_post_fields(), but my problem is atm, that i can't login to the forum.
If i try to post a message, my result is the vB login page.
I tryed to login with cookies, like in the example at php.net, but it didn't work with vB.
Anyone have a idee?
heres my code:
PHP:
$url = 'http://andy-server/forum/3.vb/newthread.php?do=newthread&f=4';
$data = array('subject' => 'test-betreff', 'message' => 'inhalt bllsadfjafh');
$files = array();
$options = array(
'bbpassword' => '76e93f0f0f3a8018e80d367fae3905ae', // md5hash of the pw
'bbuserid' => '2', // userid
'bbsessionhash' => '326e0f19bebbaa837a60c8d52c9dc71d' // session is, just for testing but it didn't work (i created the session before with the browser)
);
$req = http_post_fields($url , $data, $files, $options);
echo $req;
btw, sry for my bad english xD