Smart, det tenkte jeg ikke på!
<?php
if (sizeof($_POST) === 0) die;
file_put_contents("logg.txt", print_r($_POST, true));
# Create a connection
$url = 'https://homeseer/phlapi?dtype=GF';
$ch = curl_init($url);
# Setting our options
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($_POST));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "user:password");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
# Get the response
$response = curl_exec($ch);
file_put_contents("logg.txt", print_r($response, true), FILE_APPEND);
curl_close($ch);
?>
Merk at jeg kjører HTTPS og autentisert, så det må du evnt ta bort.