Answer the question
In order to leave comments, you need to log in
How to solve the problem when authorizing OLX on a remote server?
There is an authorization function in olx using curl
$req = curl_init();
$opt = array(
CURLOPT_URL => 'https://www.olx.ua/account/?ref[0][action]=myaccount&ref[0][method]=index',
CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36',
CURLOPT_REFERER => 'https://www.olx.ua',
CURLOPT_SSL_VERIFYPEER => false, // Disabled SSL Cert checks
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1,//3,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_ENCODING => "",
CURLOPT_AUTOREFERER => true,
CURLOPT_CONNECTTIMEOUT => 120,
CURLOPT_TIMEOUT => 120,
CURLOPT_MAXREDIRS => 101,
CURLOPT_COOKIE => $cookie,
CURLOPT_COOKIEFILE => $cookie,
CURLOPT_COOKIEJAR => $cookie,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $postArray,
);
curl_setopt_array($req, $opt);
$returns = curl_exec($req);
array(3) {
["login[email_phone]"]=>
string(23) "[email protected]"
["login[password]"]=>
string(12) "11111111"
["login[remember-me]"]=>
string(1) "1"
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question