OpenCart CMS otomatik olarak curl ile giriş yapmak ve ona otomatik olarak
ama onu ekleyemiyorum.Aramadım ve sonuç bulunamadı ama bana yardımcı olamaz ve hiçbir sonuç alamıyorum. İlk ben username
ve password
başlatmak ve web sitemin admin
ile bağlantı oluşturmanın URL'min sonra ben sonra CURLOPT_POST
istek ve CURLOPT_POSTFIELDS
ve $ch
yürütmek kullanmak ama şimdi don Bu koddaGiriş yap Opencart kullanıcısının Admin of curl of PHP
<?php
include_once "simple_html_dom.php";
$username = 'active';
$password = '123active';
$loginUrl = 'http://localhost:100/mywebsite/admin/';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $loginUrl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'username='.$username.'&password='.$password);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$store = curl_exec($ch);
$html=new simple_html_dom();
$html->load($store);
foreach($html->find("li#dashboard") as $dash){
echo $dash->innertext;
}
?>
: Bu benim kodudur cookie.txt
ile ilgili herhangi bir sonuç almamış ve web sitesinin yöneticisine
girmemiş.
formu incelemek o '& autologin = 1 & userlogi = login' sorun var: kimse bu deneyin ? .I test! Ama sonuç alamıyorum – MEAM