I have a project to collect user information by a HTML local file. The project is aiming to be cross-platform and portable (require to have bash like git bash of github). All collected data would be sent to a bash script by custom protocol set up previously. Now, I want use bash to sign in to Gravatar using xml-rpc. I found this script
#! /bin/bash
# ping technorati
# configuration
ADDRESS="http://www.acooke.org/cute"
NAME="C[omp]UTE"
# (end of configuration)
export PATH="$PATH:$CUTE_DIR/scripts"
tmp=`mktemp`
echo "<?xml version=\"1.0\"?>
<methodCall>
<methodName>weblogUpdates.ping</methodName>
<params>
<param>
<value>$NAME</value>
</param>
<param>
<value>$ADDRESS</value>
</param>
</params>
</methodCall>" > "$tmp"
size=`cat "$tmp" | wc -c`
msg=`mktemp`
echo "POST /rpc/ping HTTP/1.0
User -Agent: bash script across netcat - andrew@...
Host: rpc.technorati.com
Content-Type: text/xml
Content-length: $size
" > "$msg"
cat "$tmp" >> "$msg"
rm "$tmp"
cat "$msg"
cat "$msg" | nc rpc.technorati.com 80
rm "$msg"
I wonder how to transform this into https for Gravatar?
Curl should be there for you:
Should do the job.
It did for my hyper simple service making x+y on strings