Jump to content

How to store login cookies xmlhttprequest in phpbb3?


siddscool19

Recommended Posts

I want to store the cookies when I login using xmlhttprequest in phpbb3 forum so that i can use the cookies again..... Here are the codings I wrote but they are not working....

include('class.XMLHttpRequest.php');
$xml = new XMLHttpRequest();
$xml->open("POST","http://www.phpbb3.com/ucp.php?mode=login");
$xml->send("username=user&password=pass&redirect=&login=Login");
$cookie=$xml->getResponseHeader('Set-Cookie');
echo $cookie;

$xml = new XMLHttpRequest();
$xml->open("POST","http://www.phpbb3.com/posting.php?mode=post&f=4");
$xml->setRequestHeader("Cookie",$cookie);
$xml->send(null);
echo $xml->responseText;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.