rainboww
12.02.2010, 17:33
Авторизация удается, но дальше при редактировании профиля форма не отсылается. Пробовал заполнять поля и строкой и массивом.
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4) Gecko/2008102920 AdCentriaIM/1.7 Firefox/3.0.4");
curl_setopt($curl, CURLOPT_URL, 'http://www.livejournal.com/login.bml');
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, 'user=0captain_memo&password=201826');
curl_setopt($curl, CURLOPT_REFERER, 'http://www.livejournal.com');
curl_setopt($curl, CURLOPT_COOKIEJAR, "./cook1");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
$data = array('name' => '0captain_memo',
'gender' => 'M',
'month' => '6',
'day' => '02',
'year' => '1988',
'opt_sharebday' => 'A',
'opt_showbday' => 'D',
'opt_showschools' => 'F',
'interests' => 'music',
'bio' => '',
'url' => 'http://google.com',
'urlname' => 'google.com',
'opt_showlocation' => 'Y',
'Widget%5BLocation%5D_country' => 'RU',
'Widget%5BLocation%5D_statedrop' => '58',
'Widget%5BLocation%5D_stateother' => '',
'Widget%5BLocation%5D_city' => '',
'Widget%5BLocation%5D_minimal_display' => '0',
'allow_contactshow' => 'Y',
'opt_whatemailshow' => 'N',
'LJ__Setting__FindByEmail_opt_findbyemail' => 'H',
'LJ__Setting__UserMessaging_opt_usermsg' => 'Y',
'opt_showonlinestatus' => 'F',
'aolim' => '',
'icq' =>'' ,
'yahoo' => '',
'msn' => '',
'jabber' => '' ,
'google_talk' => '',
'skype' => '',
'gizmo' =>'' ,
'last_fm_user' => '',
'txtmsg_security' => 'N',
'txtmsg_provider' => '',
'txtmsg_number' => '',
'opt_hidefriendofs' => 'on',
'opt_disable_vgifts' => 'none',
'lj_form_auth => '.$lj_form_auth[1]);
$data2 = 'lj_form_auth='.$lj_form_auth[1].'&name=cap007&gender=M&month=6&day=02&year=1978&opt_sharebday=A&opt_showbday=D&opt_showschools=F&interests=music&bio=&url=http://google.com&urlname=google.com&opt_showlocation=Y&Widget%5BLocation%5D_country=RU&Widget%5BLocation%5D_statedrop=58&Widget%5BLocation%5D_stateother=&Widget%5BLocation%5D_city=&Widget%5BLocation%5D_minimal_display=0&allow_contactshow=Y&opt_whatemailshow=N&LJ__Setting__FindByEmail_opt_findbyemail=H&LJ__Setting__UserMessaging_opt_usermsg=Y&opt_showonlinestatus=F&aolim=&icq=&yahoo=&msn=&jabber=&google_talk=&skype=&gizmo=&last_fm_user=&txtmsg_security=N&txtmsg_provider=&txtmsg_number=&opt_hidefriendofs=on&opt_disable_vgifts=none';
curl_setopt($curl, CURLOPT_REFERER, 'http://www.livejournal.com/');
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_URL, 'http://www.livejournal.com/manage/profile');
$result= curl_exec($curl);
echo $result;
curl_close ($curl);
?>
Помогите найти ошибку
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4) Gecko/2008102920 AdCentriaIM/1.7 Firefox/3.0.4");
curl_setopt($curl, CURLOPT_URL, 'http://www.livejournal.com/login.bml');
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, 'user=0captain_memo&password=201826');
curl_setopt($curl, CURLOPT_REFERER, 'http://www.livejournal.com');
curl_setopt($curl, CURLOPT_COOKIEJAR, "./cook1");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
$data = array('name' => '0captain_memo',
'gender' => 'M',
'month' => '6',
'day' => '02',
'year' => '1988',
'opt_sharebday' => 'A',
'opt_showbday' => 'D',
'opt_showschools' => 'F',
'interests' => 'music',
'bio' => '',
'url' => 'http://google.com',
'urlname' => 'google.com',
'opt_showlocation' => 'Y',
'Widget%5BLocation%5D_country' => 'RU',
'Widget%5BLocation%5D_statedrop' => '58',
'Widget%5BLocation%5D_stateother' => '',
'Widget%5BLocation%5D_city' => '',
'Widget%5BLocation%5D_minimal_display' => '0',
'allow_contactshow' => 'Y',
'opt_whatemailshow' => 'N',
'LJ__Setting__FindByEmail_opt_findbyemail' => 'H',
'LJ__Setting__UserMessaging_opt_usermsg' => 'Y',
'opt_showonlinestatus' => 'F',
'aolim' => '',
'icq' =>'' ,
'yahoo' => '',
'msn' => '',
'jabber' => '' ,
'google_talk' => '',
'skype' => '',
'gizmo' =>'' ,
'last_fm_user' => '',
'txtmsg_security' => 'N',
'txtmsg_provider' => '',
'txtmsg_number' => '',
'opt_hidefriendofs' => 'on',
'opt_disable_vgifts' => 'none',
'lj_form_auth => '.$lj_form_auth[1]);
$data2 = 'lj_form_auth='.$lj_form_auth[1].'&name=cap007&gender=M&month=6&day=02&year=1978&opt_sharebday=A&opt_showbday=D&opt_showschools=F&interests=music&bio=&url=http://google.com&urlname=google.com&opt_showlocation=Y&Widget%5BLocation%5D_country=RU&Widget%5BLocation%5D_statedrop=58&Widget%5BLocation%5D_stateother=&Widget%5BLocation%5D_city=&Widget%5BLocation%5D_minimal_display=0&allow_contactshow=Y&opt_whatemailshow=N&LJ__Setting__FindByEmail_opt_findbyemail=H&LJ__Setting__UserMessaging_opt_usermsg=Y&opt_showonlinestatus=F&aolim=&icq=&yahoo=&msn=&jabber=&google_talk=&skype=&gizmo=&last_fm_user=&txtmsg_security=N&txtmsg_provider=&txtmsg_number=&opt_hidefriendofs=on&opt_disable_vgifts=none';
curl_setopt($curl, CURLOPT_REFERER, 'http://www.livejournal.com/');
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_URL, 'http://www.livejournal.com/manage/profile');
$result= curl_exec($curl);
echo $result;
curl_close ($curl);
?>
Помогите найти ошибку