Hallo,
auf meinen Rasp 4 läuft cURL nicht.
Auf meinen PC mit Apache 2 läuft der folgende Code.
Auf dem Rasp läut es nur bis ( echo "Pos ";).
Leider verstehe ich nicht Manual wie ich die Option --with-curl[=DIR] kompiliere.
Kann jemand helfen?
LG
PHP
<?php
echo "Start ";
$url = "192.168.178.46:8080/user/var/120/10103/0/0/12080";
echo "Pos ";
$curl = curl_init($url);
echo "Pos 0 ";
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
echo "Pos 1 ";
$headers = array(
"Content-Type: application/x-www-form-urlencoded",
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
echo "Pos 2 ";
$data = "value=1802";
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
echo "Pos 3 ";
$resp = curl_exec($curl);
echo "Pos 4 ";
curl_close($curl);
echo "Pos 5 ";
var_dump($resp);
echo "Bodenheizung Aus";
?>
Alles anzeigen