export comments |
[Mar. 20th, 2005|06:21 pm]
LiveJournal Client Discussions
|
[ | mood |
| | confused | ] | i'm trying to get the comment data into a php script, but it's giving me nothing. the login works fine, but trying to read the export_comments file gives me nothing.
any help would be greatly appreciated
sorry if i've not given enough information, or posted in the wrong place or something
$loginstring = "mode=login&user=7semitytneves&password=xxxxxx";
$lj = fsockopen("www.livejournal.com", 80);
$request = "POST /interface/flat HTTP/1.0
Host: www.livejournal.com
User-Agent: something; mbannon@gmail.com
Content-type: application/x-www-form-urlencoded
Content-length: ".strlen($loginstring)."
".$loginstring;
fputs($lj,$request);
while (!feof ($lj)) {
$buffer = fgets($lj, 4096);
echo $buffer;
}
echo "
----- getting comments -----
";
$next = "GET /export_comments.bml?get=comment_meta&startid=0";
fputs($lj,$next);
while(!feof($lj))
{
echo fgets($lj, 4096);
}
?>
|
|