Code
$login = c("edit1")->text;
$pass = c("edit2")->text;
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://...../p-login?');
curl_setopt($curl, CURLOPT_COOKIEJAR, '/cookie.txt');
curl_setopt($curl, CURLOPT_COOKIEFILE, '/cookie.txt');
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (Windows; U; Windows NT 5.0; En; rv:1.8.0.2) Gecko/20070306 Firefox/1.0.0.4");
curl_setopt($curl, CURLOPT_FAILONERROR, 1);
curl_setopt($curl, CURLOPT_REFERER, 'http://....../');
curl_setopt($curl, CURLOPT_TIMEOUT, 3);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, 'AuthForm[loginOrEmail]='.$login.'&AuthForm[password]='.$pass.'&cookieuser=1');
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
curl_close($curl);
можете поправить?