Mr. Legend (mr_legend) wrote in lj_dev,
Mr. Legend
mr_legend
lj_dev

Session

 Hello. I trying to set cookies from php to parse an "only for friends" page. I have correct session (i get it from XML-RPC sessiongenerate), but LJ still shows me "You must log in to look at this entry. Please log in above to access the site.". I dont know why. How can i fix this issue?
I use something like this:

$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>"Accept-language: en\r\n" .
"Cookie: ljloggedin=".$userid.";ljmastersession=".$session."\r\n" ) );
$url = 'http://'.$journal.'.livejournal.com/'.$ditemid.'.html?format=light';
$context = stream_context_create($opts);
$tempFile = file_get_contents($url, false, $context);

Userid something like 
u25378835:s1 and session v1:u25378835:s1:t1297530000:gc7fa046886033e0ae093793d0da6f93e788c848d//Thanks for signing in! LiveJournal loves you a lot! Here have a cookie
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 11 comments