我正在尝试将网站集成到我自己的页面中。要访问远程站点,您必须登录.index.php显示了我如何使用cURL嵌入站点。
index.php
<?php
ob_start();
$path = "http://domain.de";
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, $path);
curl_exec($curl_handle);
$contents=ob_get_contents();
ob_end_clean();
echo str_replace('href="/','href="http://domain.de/',str_replace('src="/','src="http://domain.de/',$contents));
curl_close($curl_handle);
当我填写登录表单并提交时,我收到此错误:
We received an unexpected status code from the server (404)
问题是POST请求进入我的网站而不是远程
我的问题:
如何将我的登录数据发布到远程站点,找出响应,然后在我的页面上使用该站点?欢迎任何帮助! (抱歉我的描述不好)