Oops, I did look at that / and thought it looked out of place and double check.
Anyways, I'm guessing my script needs a GET, as it's a URL containing the info, vs a POST with the info in the body.
Here's my script
<?php
$hostname = "localhost";
$username = "XXXXXXXX";
$password = "YYYYYYYYYYY";
$db = "TestData";
$conn = mysqli_connect($hostname,$username,$password,$db);
if (!$conn) {
die("Connection failed: ". $mysqli_connect_error());
}
echo "Connected successfully <br>";
$sql = "INSERT INTO Temperatures (TimeStamp, T0Temp, P0Temp) VALUES (FROM_UNIXTIME($_GET[TimeStamp]),$_GET[T0Temp],$_GET[P0Temp])";
if (mysqli_query($conn, $sql)) {
echo "New record created succcessfully";
} else {
echo "Error: " .$sql . "<br>" . mysqli_error($conn);
}
mysqli_close($conn);
?>
Like I said, the script works from a browser, and it returns:
Connected successfully
New record created succcessfully
I can clean these echo statements up later to let the PLC decipher them easier.