Please help, i spent 3 days now for solving of this problem. I try get authorization and show after page like "/index.php?page=xml", but I get only login page, some cookies saved to local server.
Here is PHP curl code:
<?php
$login = 'XX';
$password = 'XX';
$site = 'http://site';
$cookies = dirname(__FILE__) . '/cookies.txt';
$automatic = curl_init();
curl_setopt($automatic, CURLOPT_USERAGENT, $user_agent);
curl_setopt($automatic, CURLOPT_REFERER, "http://google.com/");
curl_setopt($automatic, CURLOPT_TIMEOUT, 10);
curl_setopt($automatic, CURLOPT_URL, $site . '/index.php?page=index');
curl_setopt($automatic, CURLOPT_RETURNTRANSFER, true);
curl_setopt($automatic, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($automatic, CURLOPT_POST, true);
curl_setopt($automatic, CURLOPT_POSTFIELDS, "user.auth.login=$login&user.auth.pass=$password");
curl_setopt($automatic, CURLOPT_COOKIEFILE, $cookies);
curl_setopt($automatic, CURLOPT_COOKIEJAR, $cookies);
curl_exec($automatic);
curl_setopt($automatic, CURLOPT_URL, $site. '/index.php?page=xml');
$demo = curl_exec($automatic);
curl_close($automatic);
echo $demo;
?>
Cookies.txt:
site FALSE / FALSE 1429273488 def.sess.number 2a86dcf7d2a896f323fb2931337efe60
The site form:
<form name=enterform action="/index.php?page=index" method=post>
<table border=0 cellspacing=0 cellpadding=2 width=740>
<tr>
<td valign=bottom bgcolor=#01568D width=80>
<input type=input maxlength=32 size=9 class="logindata" name="user.auth.login" value="" onKeyDown="return TrapKeyDown(event);" onKeyPress="return TrapKeyPress(event);"><br>
<input type=password maxlength=32 size=9 class="logindata" name="user.auth.pass" onKeyDown="return TrapKeyDown(event);" onKeyPress="return TrapKeyPress(event);">
</td>
</tr>
<tr>
<td bgcolor=#01568D height=40 colspan=2 align=right valign=bottom><a href="javascript:document.forms['enterform'].submit();"><font class="startbuttons">LOGIN</font></a> </td>
</tr>
</table>
</form>
Whagt I do wrong?