I'm trying to integrate a website into my own page. To get acces to the remote site you must to be logged in. The index.php shows how I embed the site using 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);
When I fill out the login-form and submit, I got this error:
We received an unexpected status code from the server (404)
The problem is that the POST request goes to my site and not the remote.
My question:
How can I post my login-data to the remote site, catch out the response and then use the site on my page? Any help is welcome! (Sorry for my bad description)