Friday, August 13, 2010
APRS messages 2 SMS txt
What I am working on is going to be 2 way, so a HAM using SMS could send a message to a HAM on APRS - and visa/versa - however as it stands right now, the messages coming from APRS get sent FROM one phone number, and the messages being sent TO APRS go into a different phone number, In order to keep non-HAM out of the system I setup a "PASSCODE" system, so you must know your passcode in order to send a message from SMS and get it into the APRS system.
That part of the what I am trying to put together, will also try to verify your call sign (Unfortunately at this time this will only work for U.S. hams), IT will only work with base call signs at this point, - IE: NO SSID - thou you can still send a message to someone using an SSID. (I just need to set down and rewrite the code a bit to allow SSIDs, just haven't done it yet)
The 2nd part, would be what you do on the APRS side of things -
Send a message to SMS2 - the phone number of the ham you want to contact, a "|" and a brief message
so it would be something like this
1231231234|this is a test
the 2nd part of the my script checks aprs.is system (I'm thinking maybe every 5 mins) - and if a message is new, it will forward it to the phone number
I guess the question would - what if you don't know the phone number? I don't want the responsibility of storing anybodies personal information, so I don't want to make a hugh data base of hams and the phone numbers.
SO the question is would there maybe be a better way for the APRS to SMS response?
Honestly, I can't think of anything, but there are people who are much smarter then I am.
Any thoughts? any ideas?
This is still very much a work in progress. VERY VERY much a work in progress.
LeRoy, KD8BXP
Sunday, July 25, 2010
Problems deleting Direct Messages from twitter using PHP/Curl and the Supertweet.net api
This is the response I get back:
The method specified in the request is not allowed for the resource identified by the request URI You can get technical details http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6
Going to the w3.org web site this is what it says:
10.4.6 405 Method Not Allowed
The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow header containing a list of valid methods for the requested resource.
Which to me isn't helpful.
My code is this:
$msgdestroy = "http://api.supertweet.net/1/direct_messages/destroy/";
$msgidid = $checksum3[$counter1] . '.xml'; //this is the id of the message.
function distroydm($destroyurl,$user,$password, $msgidid) {
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, "$destroyurl");
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "$msgidid");
curl_setopt($curl_handle, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($curl_handle, CURLOPT_USERPWD, "$user:$password");
$buffer=curl_exec($curl_handle);
curl_close($curl_handle);
return $buffer;
}
curl -u user:password --http-request DELETE http://api.twitter.com/1/direct_messages/destroy/88619848.xml
Which would be a command line, of the above code (I think), when I run it via the command line, however - I get the same error directing me back to w3.org
I've googled this, and didn't find anything helpful - Hoping someone who understands the API a bit better maybe able to give me some idea as to what I am doing wrong.
-Thanks - LeRoy, KD8BXP