php авторизация. не авторизируюсь, почему, где ошибка?
логин и пароль тут поставил неверные по понятным причинам
$login = 'login';
$password = 'password';
$curl = curl_init();
curl_setopt($curl,CURLOPT_URL,'https://profile.onliner.by/login?redirect=http://www.onliner.by/login');
curl_setopt($curl, CURLOPT_COOKIESESSION, TRUE);
curl_setopt($curl, CURLOPT_COOKIEFILE, "cookiefile");
curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl,CURLOPT_FOLLOWLOCATION,true);
curl_setopt($curl,CURLOPT_CONNECTTIMEOUT,10);
curl_setopt($curl,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 6.0; ru; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3');
curl_setopt($curl,CURLOPT_POSTFIELDS,"login=$login&password=$password&autologin=0");
/* Тут должен получать страницу и вводить ее в переменную */
$content = curl_exec($curl);
curl_close($curl);
// парсинг
$pos = strpos($content, '
$content = substr($content, $pos);
$pos = strpos($content, '');
$content = substr($content, 0, $pos);
echo $content;