K
K
kappka2015-08-27 23:54:20
PHP
kappka, 2015-08-27 23:54:20

Authorization by a script on a ucoz site: what's wrong?

Hello. I am trying to log in to the ucoz site using a php script (curl) to go to the necessary pages . I
use the following code:

$myCurl = curl_init();
    curl_setopt_array($myCurl, [
        CURLOPT_URL => 'http://сайт/index/sub',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_FOLLOWLOCATION => 1,
        CURLOPT_POST => true,

        CURLOPT_POSTFIELDS => http_build_query([
        	тут параметры
        ])
    ]);
    $response = curl_exec($myCurl);
    curl_close($myCurl);

Next, I get the key:
<?xml version="1.0" encoding="UTF-8"?><ajax><cmd p="innerHTML" t="msgL555"><![CDATA[<div class="myWinLoadSD"></div>]]></cmd><cmd p="js"><![CDATA[var ad=window.location.href.replace(/#(.*)?/,'');setTimeout("window.location.href='"+ad+"?lUqgl1'",'1000')]]></cmd></ajax>

In this case it is lUqgl1.
I send a GET request 'site_address?received_key' again via curl, but authorization does not occur.
What am I missing and what should I do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Babilya, 2015-08-28
@lordonx3

See login and password encoding.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question