Hello.
I have been sitting for 2 days and I don’t understand why it doesn’t work. No matter how I changed the code, it will not be authorized anyway. Please help, what is wrong here?
$curl = curl_init(); curl_setopt($curl, CURLOPT_URL, 'http://nnm-club.ru/forum/login.php'); curl_setopt($curl, CURLOPT_USERAGENT, "Opera/10.00 (Windows NT 5.1; U; ru) Presto/2.2.0"); curl_setopt($curl, CURLOPT_REFERER, 'http://nnm-club.ru/forum/'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, 'username=nick&password=Qwerty123&autologin=1&returnto='); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($curl, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt($curl, CURLOPT_COOKIEFILE, 'cookie.txt'); iconv("windows-1251","utf-8",curl_exec($curl)); curl_setopt($curl, CURLOPT_URL, 'http://nnm-club.ru/forum/viewtopic.php?t=480539'); curl_setopt($curl, CURLOPT_REFERER, 'http://nnm-club.ru/forum/'); echo iconv("windows-1251","utf-8",curl_exec($curl)); curl_close($curl);