This is type of thing is a bit new to me and to be honest I'm not quite sure how to go by accomplishing it. Insight on this would be very much welcomed.
Try looking up the curl command.
$response = `curl -d key=value&key2=value url`;
Just offhand I thought a better solution might be to store the key in a local binary file somehow but haven't figured out how to do it without offering up a private pgp key. :-)