HI I am using curl to do a http request to my arduino, the arduino is firing a response the last line captured from wireshark shows 1023.
however mywebpage always has a value of 1
here is my php curl command
<?php
//set POST variables
$url = $_POST['url'];
unset($_POST['url']);
$fields_string = "";
//url-ify the data for the POST
foreach($_POST as $key=>$value) {
$fields_string .= $key.'='.urlencode($value).'&';
}
rtrim($fields_string,"&");
//open connection
$ch = curl_init();
//set the url, number of POST vars, POST data
$url .= '&';
$url .= $fields_string;
curl_setopt($ch,CURLOPT_URL,$url);
//execute post
$string = curl_exec($ch);
// curl_exec($ch);
curl_close($ch);
echo $string;
?>
I am very much learning this as I go, do I need to set something else in curl??