I have look here and on the web and I am sending this as a post from php but keep getting unknown variable.
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://api.particle.io/v1/devices/" . $deviceid . "/" . $pcall . "?access_token=" . $ptoken); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOP_POST, 1); curl_setopt($ch, CURLOP_POSTFIELDS, http_build_query(array('args' => $info))); $response = curl_exec( $ch ); curl_close($ch);
$deviceid is the device
$pcall is the name of the function
$ptoken is the token for api
$info is the string I am sending to the function.