Schau dir mal cURL an. Damit sollte das gehen.
Habe ich bereits vorher schon versucht.
PHP
<?php
error_reporting(E_ALL);
$formURL = 'seite.de/conversation-add/';
$var = 'userID=401&subject=beispiel&text=123123';
echo "Debug #1<br>";
$send = curlStart($formURL,$var);
function curlStart($domain, $var = false){
$fp = curl_init($domain);
curl_setopt($fp,CURLOPT_TIMEOUT,10);
curl_setopt($fp,CURLOPT_FAILONERROR,1);
curl_setopt($fp,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
if($var != false) {
curl_setopt($fp,CURLOPT_POST,1);
curl_setopt ($fp, CURLOPT_POSTFIELDS, $var);
}
$reponse = curl_exec($fp);
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$header = substr($response, 0, $header_size);
$body = substr($response, $header_size);
echo $header_size;
echo "<br>";
echo $header;
echo "<br>";
echo $body;
echo "<br>";
echo "Debug #2";
if(curl_errno($fp) != 0) {
$send = FALSE;
} else {
$send = TRUE;
}
curl_close($fp);
return $send;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Testseite</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="keywords" content="">
</head>
<body>
</body>
</html>
Alles anzeigen
Das funktioniert leider nicht.