我想将帖子数据从 Core PHP 登录发送到 CodeIgniter 登录。如何发送这些数据。在本节中,我使用的是 CURL,但我找不到确切的解决方案。
$url = 'http://example.com/user/login';
$post_fields=array('email'=>$_POST['user_email'],'password'=>$_POST['user_password']);
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($post_fields));
curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query($post_fields));
$result = curl_exec($ch);
curl_close($ch);